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
Fields inherited from class de.uka.ipd.sdq.workflow.jobs.AbstractJob
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the.boolean
Adds the.boolean
addAll
(int index, Collection<? extends IJob> c) Adds the all.boolean
addAll
(Collection<? extends IJob> c) Adds the all.void
Adds the first.void
Adds a job to the end of the list of composite jobs.void
Adds the last.void
cleanup
(IProgressMonitor monitor) Clean up all temporary side effects of this job.void
clear()
Clear.clone()
Clone.boolean
Contains.boolean
containsAll
(Collection<?> c) Contains all.Descending iterator.element()
Element.boolean
Equals.abstract void
execute
(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.int
hashCode()
Hash code.int
Index of.boolean
isEmpty()
Checks if is empty.iterator()
Iterator.int
Last index of.List iterator.listIterator
(int index) List iterator.boolean
Offer.boolean
offerFirst
(IJob e) Offer first.boolean
Offer last.peek()
Peek.Peek first.peekLast()
Peek last.poll()
Poll.Poll first.pollLast()
Poll last.pop()
Pop.void
Push.remove()
Removes the.remove
(int index) Removes the.boolean
Removes the.boolean
removeAll
(Collection<?> c) Removes the all.Removes the first.boolean
Removes the first occurrence.Removes the last.boolean
Removes the last occurrence.boolean
retainAll
(Collection<?> c) Retain all.Sets the.void
Sets the name.int
size()
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, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods 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:ICompositeJob
Adds a job to the end of the list of composite jobs.- Specified by:
addJob
in interfaceICompositeJob
- Parameters:
job
- the job to add
-
execute
public abstract void execute(IProgressMonitor monitor) throws JobFailedException, UserCanceledException Description copied from interface:IJob
Execute the job. In case of an error throw an exception with a meaningful name which can be understood by a user.- Specified by:
execute
in interfaceIJob
- Parameters:
monitor
- the monitor- Throws:
JobFailedException
- the job failedUserCanceledException
- the user has chosen to abort the job
-
getName
Description copied from interface:IJob
Supply 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:
cleanup
in 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:
containsAll
in interfaceCollection<IJob>
- Specified by:
containsAll
in 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:
lastIndexOf
in interfaceList<IJob>
- Parameters:
o
- the o- Returns:
- the int
- See Also:
-
listIterator
List iterator.- Specified by:
listIterator
in interfaceList<IJob>
- Returns:
- the list iterator
- See Also:
-
listIterator
List iterator.- Specified by:
listIterator
in 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.
-