public class WorkContainerImpl<W extends Work> extends Object implements WorkContainer<W>
Work
instance.Constructor and Description |
---|
WorkContainerImpl(W work,
WorkMetaData<W> workMetaData,
ProcessState processState)
Initiate.
|
Modifier and Type | Method and Description |
---|---|
void |
administerManagedObjects(TaskDutyAssociation<?> duty,
AdministratorContext adminContext,
ContainerContext containerContext)
Administers the
ManagedObject instances as per the input
TaskDutyAssociation . |
void |
coordinateManagedObjects(ManagedObjectIndex[] managedObjectIndexes,
JobContext jobContext,
JobNode jobNode,
JobNodeActivateSet notifySet,
ContainerContext context)
Coordinates the
ManagedObject instances. |
Object |
getObject(ManagedObjectIndex index,
ThreadState threadState)
Obtains the Object of the particular
ManagedObject . |
W |
getWork(ThreadState threadState)
Obtains the
Work being managed. |
void |
governManagedObjects(ManagedObjectIndex[] managedObjectIndexes,
JobContext jobContext,
JobNode jobNode,
JobNodeActivateSet activateSet,
ContainerContext context)
Governs the
ManagedObject instances. |
boolean |
isManagedObjectsReady(ManagedObjectIndex[] managedObjectIndexes,
JobContext jobContext,
JobNode jobNode,
JobNodeActivateSet notifySet,
ContainerContext context)
Indicates if the particular
ManagedObject is ready for use. |
void |
loadManagedObjects(ManagedObjectIndex[] managedObjectIndexes,
JobContext jobContext,
JobNode jobNode,
JobNodeActivateSet notifySet,
TeamIdentifier currentTeam,
ContainerContext context)
Triggers for the particular
ManagedObject instances to be loaded. |
void |
unloadWork(JobNodeActivateSet activateSet,
TeamIdentifier currentTeam)
Unloads the
Work . |
public WorkContainerImpl(W work, WorkMetaData<W> workMetaData, ProcessState processState)
work
- Work
to be managed.workMetaData
- WorkMetaData
.processState
- ProcessState
.public W getWork(ThreadState threadState)
WorkContainer
Work
being managed.getWork
in interface WorkContainer<W extends Work>
threadState
- ThreadState
requiring the Work
.Work
being managed.public void loadManagedObjects(ManagedObjectIndex[] managedObjectIndexes, JobContext jobContext, JobNode jobNode, JobNodeActivateSet notifySet, TeamIdentifier currentTeam, ContainerContext context)
WorkContainer
ManagedObject
instances to be loaded.loadManagedObjects
in interface WorkContainer<W extends Work>
managedObjectIndexes
- ManagedObjectIndex
instances identifying the
ManagedObject
instances to be loaded.jobContext
- Context for executing the JobNode
.jobNode
- JobNode
requesting the ManagedObject
instances
to be loaded.notifySet
- JobNodeActivateSet
to add JobNode
instances to
activate.currentTeam
- TeamIdentifier
of the current Team
loading the
ManagedObject
instances.context
- ContainerContext
.public void governManagedObjects(ManagedObjectIndex[] managedObjectIndexes, JobContext jobContext, JobNode jobNode, JobNodeActivateSet activateSet, ContainerContext context)
WorkContainer
ManagedObject
instances.governManagedObjects
in interface WorkContainer<W extends Work>
managedObjectIndexes
- ManagedObjectIndex
instances identifying the
ManagedObject
instances for Governance
.jobContext
- Context for executing the JobNode
.jobNode
- JobNode
requesting the ManagedObject
instances
for Governance
.activateSet
- JobNodeActivateSet
to add JobNode
instances to
activate.context
- ContainerContext
.public void coordinateManagedObjects(ManagedObjectIndex[] managedObjectIndexes, JobContext jobContext, JobNode jobNode, JobNodeActivateSet notifySet, ContainerContext context)
WorkContainer
ManagedObject
instances.coordinateManagedObjects
in interface WorkContainer<W extends Work>
managedObjectIndexes
- ManagedObjectIndex
instances identifying the
ManagedObject
instances to be coordinated.jobContext
- Context for executing the JobNode
.jobNode
- JobNode
requesting the ManagedObject
instances
to be coordinated.notifySet
- JobNodeActivateSet
to add JobNode
instances to
activate.context
- ContainerContext
.public boolean isManagedObjectsReady(ManagedObjectIndex[] managedObjectIndexes, JobContext jobContext, JobNode jobNode, JobNodeActivateSet notifySet, ContainerContext context)
WorkContainer
ManagedObject
is ready for use. In
other words it has finished any asynchronous operations and is ready for
further use.isManagedObjectsReady
in interface WorkContainer<W extends Work>
managedObjectIndexes
- ManagedObjectIndex
instances identifying the
ManagedObject
instances to check if ready.jobContext
- Context for executing the JobNode
.jobNode
- JobNode
requiring the ManagedObject
to be
ready.notifySet
- JobNodeActivateSet
to add JobNode
instances to
activate.context
- ContainerContext
.true
if the ManagedObject
is ready for use,
otherwise false
indicating that waiting on the
ManagedObject
.public void administerManagedObjects(TaskDutyAssociation<?> duty, AdministratorContext adminContext, ContainerContext containerContext) throws Throwable
WorkContainer
ManagedObject
instances as per the input
TaskDutyAssociation
.administerManagedObjects
in interface WorkContainer<W extends Work>
duty
- TaskDutyAssociation
specifying the administration to
be undertaken.adminContext
- AdministratorContext
.containerContext
- ContainerContext
.Throwable
- If fails to administer the ManagedObject
instances.public Object getObject(ManagedObjectIndex index, ThreadState threadState)
WorkContainer
ManagedObject
.getObject
in interface WorkContainer<W extends Work>
index
- ManagedObjectIndex
identifying the
ManagedObject
.threadState
- ThreadState
.ManagedObject
.public void unloadWork(JobNodeActivateSet activateSet, TeamIdentifier currentTeam)
WorkContainer
Work
.unloadWork
in interface WorkContainer<W extends Work>
activateSet
- JobNodeActivateSet
to add JobNode
instances to
activate.currentTeam
- TeamIdentifier
of the current Team
unloading
the Work
.Copyright © 2005–2016. All rights reserved.