public interface AssetMonitor extends LinkedListSetEntry<AssetMonitor,AssetManager>
Monitor for to allow ThreadState
instances to wait until an
Asset
is completed processing.
May be used as a LinkedListSetEntry
in a list of AssetMonitor
instances for an AssetManager
.
Modifier and Type | Method and Description |
---|---|
void |
activateJobNodes(JobNodeActivateSet activateSet,
boolean isPermanent)
Adds all the
JobNode instances waiting on the Asset to
the input JobNodeActivateSet to be activated. |
void |
failJobNodes(JobNodeActivateSet activateSet,
Throwable failure,
boolean isPermanent)
Adds all the
JobNode instances waiting on this Asset to
the input JobNodeActivateSet to be activated with the
ThreadState receiving the input failure. |
Asset |
getAsset()
Obtains the
Asset for this AssetMonitor . |
boolean |
waitOnAsset(JobNode jobNode,
JobNodeActivateSet activateSet)
Flags for the
JobNode (and more specifically the
ThreadState of the JobNode ) to wait until the
Asset activates it. |
getLinkedListSetOwner, getNext, getPrev, setNext, setPrev
Asset getAsset()
Asset
for this AssetMonitor
.Asset
for this AssetMonitor
.boolean waitOnAsset(JobNode jobNode, JobNodeActivateSet activateSet)
Flags for the JobNode
(and more specifically the
ThreadState
of the JobNode
) to wait until the
Asset
activates it.
This is typically because the Asset
is doing some processing that
the JobNode
requires completed before proceeding.
jobNode
- JobNode
to be activated when Asset
processing
is complete.activateSet
- JobNodeActivateSet
that the JobNode
is added
to if the Asset
has permanently activated this
AssetMonitor
. This may be null
to
activate via the OfficeManager
however it is much more
efficient to provide a JobNodeActivateSet
.true
if the JobNode
is waiting on the
Asset
.void activateJobNodes(JobNodeActivateSet activateSet, boolean isPermanent)
JobNode
instances waiting on the Asset
to
the input JobNodeActivateSet
to be activated.activateSet
- JobNodeActivateSet
that will later activate the
JobNode
instances waiting on the Asset
. This
may be null
to activate via the
OfficeManager
however it is much more efficient to
provide a JobNodeActivateSet
.isPermanent
- true
indicates that all JobNode
instances
added to the AssetMonitor
from now on are activated
immediately. It is useful to flag an AssetMonitor
in
this state when the Asset
is no longer being used to
stop a JobNode
from waiting forever.void failJobNodes(JobNodeActivateSet activateSet, Throwable failure, boolean isPermanent)
JobNode
instances waiting on this Asset
to
the input JobNodeActivateSet
to be activated with the
ThreadState
receiving the input failure.activateSet
- JobNodeActivateSet
that will later activate the
JobNode
instances waiting on the Asset
. This
may be null
to activate via the
OfficeManager
however it is much more efficient to
provide a JobNodeActivateSet
.failure
- Failure to propagate to the ThreadState
of the
JobNode
instances waiting on the Asset
.isPermanent
- true
indicates that all JobNode
instances
added to the AssetMonitor
from now on are activated
immediately with the input failure. It is useful to flag an
AssetMonitor
in this state when the Asset
is
in a failed state that can not be recovered from.Copyright © 2005–2016. All rights reserved.