Package de.uka.ipd.sdq.workflow.jobs
Class AbstractCompositeJob
java.lang.Object
de.uka.ipd.sdq.workflow.jobs.AbstractJob
de.uka.ipd.sdq.workflow.jobs.AbstractCompositeJob
- All Implemented Interfaces:
ICompositeJob,IJob,Iterable<IJob>,Collection<IJob>,List<IJob>
- Direct Known Subclasses:
ParallelJob,SequentialJob
The Class AbstractCompositeJob.
-
Field Summary
FieldsFields inherited from class de.uka.ipd.sdq.workflow.jobs.AbstractJob
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the.booleanAdds the.booleanaddAll(int index, Collection<? extends IJob> c) Adds the all.booleanaddAll(Collection<? extends IJob> c) Adds the all.voidAdds the first.voidAdds a job to the end of the list of composite jobs.voidAdds the last.voidcleanup(IProgressMonitor monitor) Clean up all temporary side effects of this job.voidclear()Clear.clone()Clone.booleanContains.booleancontainsAll(Collection<?> c) Contains all.Descending iterator.element()Element.booleanEquals.abstract voidexecute(IProgressMonitor monitor) Execute the job.get(int index) Gets the.getFirst()Gets the first.getLast()Gets the last.getName()Supply a name of this job.inthashCode()Hash code.intIndex of.booleanisEmpty()Checks if is empty.iterator()Iterator.intLast index of.List iterator.listIterator(int index) List iterator.booleanOffer.booleanofferFirst(IJob e) Offer first.booleanOffer last.peek()Peek.Peek first.peekLast()Peek last.poll()Poll.Poll first.pollLast()Poll last.pop()Pop.voidPush.remove()Removes the.remove(int index) Removes the.booleanRemoves the.booleanremoveAll(Collection<?> c) Removes the all.Removes the first.booleanRemoves the first occurrence.Removes the last.booleanRemoves the last occurrence.booleanretainAll(Collection<?> c) Retain all.Sets the.voidSets the name.intsize()Size.subList(int fromIndex, int toIndex) Sub list.Object[]toArray()To array.<T> T[]toArray(T[] a) To array.toString()To string.Methods 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
-
myJobs
The my jobs. -
myExecutedJobs
The my executed jobs.
-
-
Constructor Details
-
AbstractCompositeJob
public AbstractCompositeJob()Instantiates a new abstract composite job.
-
-
Method Details
-
addJob
Description copied from interface:ICompositeJobAdds a job to the end of the list of composite jobs.- Specified by:
addJobin interfaceICompositeJob- Parameters:
job- the job to add
-
execute
public abstract void execute(IProgressMonitor monitor) throws JobFailedException, UserCanceledException Description copied from interface:IJobExecute the job. In case of an error throw an exception with a meaningful name which can be understood by a user.- Specified by:
executein interfaceIJob- Parameters:
monitor- the monitor- Throws:
JobFailedException- the job failedUserCanceledException- the user has chosen to abort the job
-
getName
Description copied from interface:IJobSupply a name of this job. This could be used for a progress monitor. -
setName
Sets the name.- Parameters:
name- the new name
-
cleanup
Clean up all temporary side effects of this job. This method will always be called after executing this job to remove automatically created files and to leave the environment in a state in which the whole workflow run can be started again with the same results (i.e. in which executed can be called again). Usually, cleanup is called after the whole workflow is completed to allow other jobs to use intermediate results. In some cases, cleanup can be called earlier. However, in those cases, later jobs might not be able to access the intermediate data anymore.
This method ensures to clean up all child jobs in the reverse order in which they were added.- Specified by:
cleanupin interfaceIJob- Parameters:
monitor- the monitor- Throws:
CleanupFailedException- Thrown if a critical error occurred during clean up so that the whole workflow should abort cleaning up further jobs.
-
add
Adds the. -
add
Adds the. -
addAll
Adds the all. -
addAll
Adds the all. -
addFirst
Adds the first.- Parameters:
e- the e- See Also:
-
addLast
Adds the last.- Parameters:
e- the e- See Also:
-
clear
public void clear()Clear. -
clone
Clone. -
contains
Contains. -
containsAll
Contains all.- Specified by:
containsAllin interfaceCollection<IJob>- Specified by:
containsAllin interfaceList<IJob>- Parameters:
c- the c- Returns:
- true, if successful
- See Also:
-
descendingIterator
Descending iterator.- Returns:
- the iterator
- See Also:
-
element
Element.- Returns:
- the i job
- See Also:
-
equals
Equals. -
get
Gets the. -
getFirst
Gets the first.- Returns:
- the first
- See Also:
-
getLast
Gets the last.- Returns:
- the last
- See Also:
-
hashCode
public int hashCode()Hash code. -
indexOf
Index of. -
isEmpty
public boolean isEmpty()Checks if is empty. -
iterator
Iterator. -
lastIndexOf
Last index of.- Specified by:
lastIndexOfin interfaceList<IJob>- Parameters:
o- the o- Returns:
- the int
- See Also:
-
listIterator
List iterator.- Specified by:
listIteratorin interfaceList<IJob>- Returns:
- the list iterator
- See Also:
-
listIterator
List iterator.- Specified by:
listIteratorin interfaceList<IJob>- Parameters:
index- the index- Returns:
- the list iterator
- See Also:
-
offer
Offer.- Parameters:
e- the e- Returns:
- true, if successful
- See Also:
-
offerFirst
Offer first.- Parameters:
e- the e- Returns:
- true, if successful
- See Also:
-
offerLast
Offer last.- Parameters:
e- the e- Returns:
- true, if successful
- See Also:
-
peek
Peek.- Returns:
- the i job
- See Also:
-
peekFirst
Peek first.- Returns:
- the i job
- See Also:
-
peekLast
Peek last.- Returns:
- the i job
- See Also:
-
poll
Poll.- Returns:
- the i job
- See Also:
-
pollFirst
Poll first.- Returns:
- the i job
- See Also:
-
pollLast
Poll last.- Returns:
- the i job
- See Also:
-
pop
Pop.- Returns:
- the i job
- See Also:
-
push
Push.- Parameters:
e- the e- See Also:
-
remove
Removes the.- Returns:
- the i job
- See Also:
-
remove
Removes the. -
remove
Removes the. -
removeAll
Removes the all. -
removeFirst
Removes the first.- Returns:
- the i job
- See Also:
-
removeFirstOccurrence
Removes the first occurrence.- Parameters:
o- the o- Returns:
- true, if successful
- See Also:
-
removeLast
Removes the last.- Returns:
- the i job
- See Also:
-
removeLastOccurrence
Removes the last occurrence.- Parameters:
o- the o- Returns:
- true, if successful
- See Also:
-
retainAll
Retain all. -
set
Sets the. -
size
public int size()Size. -
subList
Sub list. -
toArray
To array. -
toArray
public <T> T[] toArray(T[] a) To array. -
toString
To string.
-