Class ClusteredAssignment
java.lang.Object
com.oracle.coherence.concurrent.executor.ClusteredAssignment
- All Implemented Interfaces:
ExternalizableLite
,PortableObject
,Serializable
- Since:
- 21.06
- Author:
- bo
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
AnInvocableMap.EntryProcessor
which updates an assignment due to an assignmentExecutionPlan.Action
.static class
AnInvocableMap.EntryProcessor
to compare and set the state of aClusteredAssignment
, returning the previous state.static enum
The current state of the assignment. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected String
TheExecutor
identity.protected String
TheTask
identity.protected ClusteredAssignment.State
TheClusteredAssignment.State
of the assignment. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs aClusteredAssignment
(required for serialization).ClusteredAssignment
(String executorId, String sTaskId) Constructs aClusteredAssignment
. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
cancelAssignments
(String sTaskId, CacheService service) Cancels all assignments that are currently running.boolean
Obtains theNamedCache
key to use for theClusteredAssignment
.static String
getCacheKey
(String sExecutorId, String sTaskId) Obtains theNamedCache
key to use for theClusteredAssignment
.Obtains theExecutor
identity.getState()
Obtains theClusteredAssignment.State
of the assignment.Obtains theTask
identity.int
hashCode()
boolean
void
Restore the contents of a user type instance by reading its state using the specified PofReader object.void
Restore the contents of this object by loading the object's state from the passed DataInput object.static void
registerAssignments
(String sTaskId, ExecutionPlan executionPlan, CacheService service) Process a list of assignments for a task.static void
removeAssignments
(String sTaskId, CacheService service) Remove assignments for a task.void
setRecovered
(boolean fRecovered) void
Sets theClusteredAssignment.State
of the assignment.toString()
void
writeExternal
(PofWriter out) Save the contents of a POF user type instance by writing its state using the specified PofWriter object.void
writeExternal
(DataOutput out) Save the contents of this object by storing the object's state into the passed DataOutput object.
-
Field Details
-
m_sExecutorId
-
m_sTaskId
-
m_state
TheClusteredAssignment.State
of the assignment. -
m_fRecovered
-
-
Constructor Details
-
ClusteredAssignment
public ClusteredAssignment()Constructs aClusteredAssignment
(required for serialization). -
ClusteredAssignment
Constructs aClusteredAssignment
.
-
-
Method Details
-
readExternal
Description copied from interface:ExternalizableLite
Restore the contents of this object by loading the object's state from the passed DataInput object.- Specified by:
readExternal
in interfaceExternalizableLite
- Parameters:
in
- the DataInput stream to read data from in order to restore the state of this object- Throws:
IOException
- if an I/O exception occurs
-
writeExternal
Description copied from interface:ExternalizableLite
Save the contents of this object by storing the object's state into the passed DataOutput object.- Specified by:
writeExternal
in interfaceExternalizableLite
- Parameters:
out
- the DataOutput stream to write the state of this object to- Throws:
IOException
- if an I/O exception occurs
-
readExternal
Description copied from interface:PortableObject
Restore the contents of a user type instance by reading its state using the specified PofReader object.- Specified by:
readExternal
in interfacePortableObject
- Parameters:
in
- the PofReader from which to read the object's state- Throws:
IOException
- if an I/O error occurs
-
writeExternal
Description copied from interface:PortableObject
Save the contents of a POF user type instance by writing its state using the specified PofWriter object.- Specified by:
writeExternal
in interfacePortableObject
- Parameters:
out
- the PofWriter to which to write the object's state- Throws:
IOException
- if an I/O error occurs
-
getExecutorId
-
getTaskId
-
getState
Obtains theClusteredAssignment.State
of the assignment.- Returns:
- the
ClusteredAssignment.State
-
setState
Sets theClusteredAssignment.State
of the assignment.- Parameters:
state
- theClusteredAssignment.State
-
isRecovered
-
setRecovered
-
getCacheKey
Obtains theNamedCache
key to use for theClusteredAssignment
.- Returns:
- the
NamedCache
key for this assignment
-
toString
-
equals
-
hashCode
-
getCacheKey
Obtains theNamedCache
key to use for theClusteredAssignment
.- Parameters:
sExecutorId
- theExecutor
identitysTaskId
- theTask
identity- Returns:
- the
NamedCache
key for this assignment
-
registerAssignments
public static void registerAssignments(String sTaskId, ExecutionPlan executionPlan, CacheService service) Process a list of assignments for a task.- Parameters:
sTaskId
- the taskexecutionPlan
- the list of assignmentsservice
- theCacheService
-
cancelAssignments
Cancels all assignments that are currently running.- Parameters:
sTaskId
- the taskservice
- theCacheService
-
removeAssignments
Remove assignments for a task.- Parameters:
sTaskId
- the taskservice
- theCacheService
-