public class JobSequenceImpl extends AbstractLinkedListSetEntry<JobSequence,ThreadState> implements JobSequence
JobSequence
.Constructor and Description |
---|
JobSequenceImpl(ThreadState threadState)
Initiate.
|
Modifier and Type | Method and Description |
---|---|
JobNode |
createGovernanceNode(GovernanceActivity<?,?> governanceActivity,
JobNode parallelNodeOwner)
|
JobNode |
createTaskNode(TaskMetaData<?,?,?> taskMetaData,
JobNode parallelNodeOwner,
Object parameter,
GovernanceDeactivationStrategy governanceDeactivationStrategy)
|
ThreadState |
getLinkedListSetOwner()
Obtains the owner of the
LinkedListSet that this
LinkedListSetEntry may be added. |
ThreadState |
getThreadState()
Obtains the
ThreadState containing this JobSequence . |
boolean |
isComplete()
Indicates whether the
JobSequence has completed. |
void |
jobNodeComplete(JobNode jobNode,
JobNodeActivateSet activateSet,
TeamIdentifier currentTeam)
Flags that the input
JobNode has completed. |
boolean |
waitOnFlow(JobNode jobNode,
long timeout,
Object token,
JobNodeActivateSet activateSet)
Flags for the input
JobNode to wait on this JobSequence . |
getNext, getPrev, setNext, setPrev
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNext, getPrev, setNext, setPrev
public JobSequenceImpl(ThreadState threadState)
threadState
- ThreadState
containing this JobSequence
.public ThreadState getLinkedListSetOwner()
LinkedListSetEntry
Obtains the owner of the LinkedListSet
that this
LinkedListSetEntry
may be added.
LinkedListSetEntry
instances may only be added to the
LinkedListSet
they were intended for and can not be shared
between LinkedListSet
instances. This constraint:
JobNode
, JobSequence
,
ThreadState
, ProcessState
structure, andLinkedListSetEntry.getNext()
and
LinkedListSetEntry.getPrev()
both returning null
indicates not addedgetLinkedListSetOwner
in interface LinkedListSetEntry<JobSequence,ThreadState>
LinkedListSet
that may contain this
LinkedListSetEntry
.public JobNode createTaskNode(TaskMetaData<?,?,?> taskMetaData, JobNode parallelNodeOwner, Object parameter, GovernanceDeactivationStrategy governanceDeactivationStrategy)
JobSequence
createTaskNode
in interface JobSequence
taskMetaData
- TaskMetaData
for the new JobNode
.parallelNodeOwner
- JobNode
that is the parallel owner of the new
JobNode
.parameter
- Parameter for the JobNode
.governanceDeactivationStrategy
- GovernanceDeactivationStrategy
.JobNode
.public JobNode createGovernanceNode(GovernanceActivity<?,?> governanceActivity, JobNode parallelNodeOwner)
JobSequence
createGovernanceNode
in interface JobSequence
governanceActivity
- GovernanceActivity
.parallelNodeOwner
- JobNode
that is the parallel owner of the new
JobNode
.JobNode
.public void jobNodeComplete(JobNode jobNode, JobNodeActivateSet activateSet, TeamIdentifier currentTeam)
JobSequence
JobNode
has completed.jobNodeComplete
in interface JobSequence
jobNode
- JobNode
that has completed.activateSet
- JobNodeActivateSet
to add JobNode
instances
waiting on this JobSequence
if all JobNode
instances of this JobSequence
are complete.currentTeam
- TeamIdentifier
of the current Team
completing
the JobNode
.public ThreadState getThreadState()
JobSequence
ThreadState
containing this JobSequence
.getThreadState
in interface JobSequence
ThreadState
containing this JobSequence
.public boolean isComplete()
FlowFuture
JobSequence
has completed.isComplete
in interface FlowFuture
true
if the JobSequence
has completed.public boolean waitOnFlow(JobNode jobNode, long timeout, Object token, JobNodeActivateSet activateSet)
FlowAsset
Flags for the input JobNode
to wait on this JobSequence
.
Note that the JobNode
may not wait on a JobSequence
contained in
the same ThreadState
as that of the JobNode
. This would
result on the ThreadState
waiting on itself and subsequently no
progression of the ThreadState
.
waitOnFlow
in interface FlowAsset
jobNode
- JobNode
to wait on this JobSequence
.timeout
- The maximum time to wait in milliseconds for the JobSequence
to complete.token
- A token added to the FlowJoinTimedOutEscalation
to aid
in identifying which JobSequence
join timed out. May be
null
.activateSet
- JobNodeActivateSet
to activate the JobNode
instances should JobSequence
be completed.true
if waiting on this JobSequence
, otherwise
false
if JobSequence
has already completed and not
waiting.Copyright © 2005–2016. All rights reserved.