Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.edit.language.model
Class DdsModelLpexAdapter.ParseJobScheduler

java.lang.Object
  extended by JobChangeAdapter
      extended by com.ibm.etools.iseries.edit.language.model.DdsModelLpexAdapter.ParseJobScheduler
Enclosing class:
DdsModelLpexAdapter

public class DdsModelLpexAdapter.ParseJobScheduler
extends JobChangeAdapter

This class schedules jobs to parse the model from the editor's contents in the background. The singleton pattern is used.


Constructor Summary
DdsModelLpexAdapter.ParseJobScheduler()
           
 
Method Summary
 void createPendingJob(DdsModelLpexAdapter.ParseDdsModelJob newJob)
          If there is a pending job - merge with it otherwise create a pending job.
 void done(IJobChangeEvent event)
           
 boolean isJobScheduled()
          Has a parse job already been scheduled
 boolean isPendingJobScheduled()
          Is there another parse job pending when the current one completes
 boolean isScheduledJobYoungerThan(long timestamp)
          The currently schedule job was created after the given timestamp If there is no schedule job, returns false
 void jobHasFinished(Job finishedJob)
          If the scheduled job has ended then schedule another one because something changed since the scheduled job started running.
 void notifyWhenAllParsingComplete(com.ibm.etools.iseries.edit.language.model.DdsModelLpexAdapter.IParseJobListener jobListener)
          The callback method in IParseJobListener is guaranteed to be called exactly once after all parse jobs have run to completion.
 void schedule(DdsModelLpexAdapter.ParseDdsModelJob newJob)
          Schedule a job If a job is already scheduled but not running merge with it.
 void scheduleParse()
          Schedule a job to parse the contents of the Lpex editor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DdsModelLpexAdapter.ParseJobScheduler

public DdsModelLpexAdapter.ParseJobScheduler()
Method Detail

scheduleParse

public void scheduleParse()
Schedule a job to parse the contents of the Lpex editor. Maintains a range of elements to fix up sequence numbers.


schedule

public void schedule(DdsModelLpexAdapter.ParseDdsModelJob newJob)
Schedule a job If a job is already scheduled but not running merge with it. If a job is already running, wait for it to end and then schedule a new one. If no job is scheduled, create a new one


createPendingJob

public void createPendingJob(DdsModelLpexAdapter.ParseDdsModelJob newJob)
If there is a pending job - merge with it otherwise create a pending job.

Parameters:
rangeBottom - - bottom of range of elements whose sequence numbers may need fixing
rangeTop - - top of range of elements whose sequence numbers may need fixing

jobHasFinished

public void jobHasFinished(Job finishedJob)
If the scheduled job has ended then schedule another one because something changed since the scheduled job started running.

Parameters:
finishedJob -

done

public void done(IJobChangeEvent event)

isJobScheduled

public boolean isJobScheduled()
Has a parse job already been scheduled


isPendingJobScheduled

public boolean isPendingJobScheduled()
Is there another parse job pending when the current one completes


isScheduledJobYoungerThan

public boolean isScheduledJobYoungerThan(long timestamp)
The currently schedule job was created after the given timestamp If there is no schedule job, returns false

Parameters:
timestamp -

notifyWhenAllParsingComplete

public void notifyWhenAllParsingComplete(com.ibm.etools.iseries.edit.language.model.DdsModelLpexAdapter.IParseJobListener jobListener)
The callback method in IParseJobListener is guaranteed to be called exactly once after all parse jobs have run to completion. If this has happened before this method is called, then the callback method is called right away

Parameters:
jobListener -

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.