Package de.uka.ipd.sdq.workflow.jobs
Class SequentialBlackboardInteractingJob<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.SequentialBlackboardInteractingJob<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>
- Direct Known Subclasses:
AbstractExtendableJob,AbstractWorkflowExtensionJob
public class SequentialBlackboardInteractingJob<BlackboardType extends Blackboard<?>>
extends SequentialJob
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.
-
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.SequentialBlackboardInteractingJob(boolean cleanUpImmediately) Instantiates a new order preserving blackboard composite job.Instantiates a new sequential blackboard job with a specific name.SequentialBlackboardInteractingJob(String name, boolean cleanUpImmediately) Instantiates a new sequential blackboard job with a specific name and specifying the clean up strategy. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(IProgressMonitor monitor) Executes all contained jobs.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.SequentialJob
cleanup, executeWithDelayedCleanUp, executeWithImmediateCleanUpMethods 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
-
SequentialBlackboardInteractingJob
public SequentialBlackboardInteractingJob()Instantiates a new order preserving blackboard composite job. -
SequentialBlackboardInteractingJob
Instantiates a new sequential blackboard job with a specific name.- Parameters:
name- The name of the job.
-
SequentialBlackboardInteractingJob
public SequentialBlackboardInteractingJob(boolean cleanUpImmediately) Instantiates a new order preserving blackboard composite job.- Parameters:
cleanUpImmediately- Flag if jobs should be cleaned up immediately or not.
-
SequentialBlackboardInteractingJob
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
-
execute
Executes all contained jobs. Depending on the jobs configuration, the execution cleans up immediately or when all jobs are done.- Specified by:
executein interfaceIJob- Overrides:
executein classSequentialJob- Parameters:
monitor- the monitor- Throws:
JobFailedException- the job failed exceptionUserCanceledException- the user canceled exception
-
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.
-