Package de.uka.ipd.sdq.workflow.jobs
Class DynamicSequentialBlackboardInteractingJob<BlackboardType extends Blackboard<?>>
java.lang.Object
de.uka.ipd.sdq.workflow.jobs.AbstractJob
de.uka.ipd.sdq.workflow.jobs.AbstractCompositeJob
de.uka.ipd.sdq.workflow.jobs.SequentialJob
de.uka.ipd.sdq.workflow.jobs.DynamicSequentialJob
de.uka.ipd.sdq.workflow.jobs.DynamicSequentialBlackboardInteractingJob<BlackboardType>
- Type Parameters:
BlackboardType- The type of the blackboard needed by all jobs in the sequential workflow
- All Implemented Interfaces:
IBlackboardInteractingJob<BlackboardType>,ICompositeJob,IJob,Iterable<IJob>,Collection<IJob>,List<IJob>
public class DynamicSequentialBlackboardInteractingJob<BlackboardType extends Blackboard<?>>
extends DynamicSequentialJob
implements IBlackboardInteractingJob<BlackboardType>
A sequential workflow which may contain jobs which need access to a common blackboard for
information exchange.
By default, the cleanup method of all jobs is called right after their execution before starting
the next job. In addition, the job is removed from the job list to ensure, objects are freed for
the garbage collection.
This job implementation allows to extend the job queue dynamically during execution.
-
Field Summary
FieldsFields inherited from class de.uka.ipd.sdq.workflow.jobs.AbstractCompositeJob
myExecutedJobs, myJobsFields inherited from class de.uka.ipd.sdq.workflow.jobs.AbstractJob
logger -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new order preserving blackboard composite job.DynamicSequentialBlackboardInteractingJob(boolean cleanUpImmediately) Instantiates a new order preserving blackboard composite job.Instantiates a new sequential blackboard job with a specific name.DynamicSequentialBlackboardInteractingJob(String name, boolean cleanUpImmediately) Instantiates a new sequential blackboard job with a specific name and specifying the clean up strategy. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteJob(IJob job, IProgressMonitor monitor) Gets the blackboard.voidsetBlackboard(BlackboardType blackboard) Sets the blackboard of this job to the given blackboard.Methods inherited from class de.uka.ipd.sdq.workflow.jobs.DynamicSequentialJob
executeWithDelayedCleanUp, executeWithImmediateCleanUpMethods inherited from class de.uka.ipd.sdq.workflow.jobs.SequentialJob
cleanup, executeMethods inherited from class de.uka.ipd.sdq.workflow.jobs.AbstractCompositeJob
add, add, addAll, addAll, addFirst, addJob, addLast, clear, clone, contains, containsAll, descendingIterator, element, equals, get, getFirst, getLast, getName, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeAll, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, retainAll, set, setName, size, subList, toArray, toArray, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
replaceAll, sort, spliterator
-
Field Details
-
myBlackboard
The my blackboard.
-
-
Constructor Details
-
DynamicSequentialBlackboardInteractingJob
public DynamicSequentialBlackboardInteractingJob()Instantiates a new order preserving blackboard composite job. -
DynamicSequentialBlackboardInteractingJob
Instantiates a new sequential blackboard job with a specific name.- Parameters:
name- The name of the job.
-
DynamicSequentialBlackboardInteractingJob
public DynamicSequentialBlackboardInteractingJob(boolean cleanUpImmediately) Instantiates a new order preserving blackboard composite job.- Parameters:
cleanUpImmediately- Flag if jobs should be cleaned up immediately or not.
-
DynamicSequentialBlackboardInteractingJob
Instantiates a new sequential blackboard job with a specific name and specifying the clean up strategy.- Parameters:
name- The name of the job sequence.cleanUpImmediately- Flag if jobs should be cleaned up immediately or not.
-
-
Method Details
-
executeJob
public void executeJob(IJob job, IProgressMonitor monitor) throws JobFailedException, UserCanceledException - Overrides:
executeJobin classDynamicSequentialJob- Throws:
JobFailedExceptionUserCanceledException
-
setBlackboard
Description copied from interface:IBlackboardInteractingJobSets the blackboard of this job to the given blackboard.- Specified by:
setBlackboardin interfaceIBlackboardInteractingJob<BlackboardType extends Blackboard<?>>- Parameters:
blackboard- The blackboard to be used by this job
-
getBlackboard
Gets the blackboard.- Returns:
- Returns the used blackboard.
-