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 classAnInvocableMap.EntryProcessorwhich updates an assignment due to an assignmentExecutionPlan.Action.static classAnInvocableMap.EntryProcessorto compare and set the state of aClusteredAssignment, returning the previous state.static enumThe current state of the assignment. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected StringTheExecutoridentity.protected StringTheTaskidentity.protected ClusteredAssignment.StateTheClusteredAssignment.Stateof the assignment. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs aClusteredAssignment(required for serialization).ClusteredAssignment(String executorId, String sTaskId) Constructs aClusteredAssignment. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcancelAssignments(String sTaskId, CacheService service) Cancels all assignments that are currently running.booleanObtains theNamedCachekey to use for theClusteredAssignment.static StringgetCacheKey(String sExecutorId, String sTaskId) Obtains theNamedCachekey to use for theClusteredAssignment.Obtains theExecutoridentity.getState()Obtains theClusteredAssignment.Stateof the assignment.Obtains theTaskidentity.inthashCode()booleanvoidRestore the contents of a user type instance by reading its state using the specified PofReader object.voidRestore the contents of this object by loading the object's state from the passed DataInput object.static voidregisterAssignments(String sTaskId, ExecutionPlan executionPlan, CacheService service) Process a list of assignments for a task.static voidremoveAssignments(String sTaskId, CacheService service) Remove assignments for a task.voidsetRecovered(boolean fRecovered) voidSets theClusteredAssignment.Stateof the assignment.toString()voidwriteExternal(PofWriter out) Save the contents of a POF user type instance by writing its state using the specified PofWriter object.voidwriteExternal(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.Stateof the assignment. -
m_fRecovered
-
-
Constructor Details
-
ClusteredAssignment
public ClusteredAssignment()Constructs aClusteredAssignment(required for serialization). -
ClusteredAssignment
Constructs aClusteredAssignment.
-
-
Method Details
-
readExternal
Description copied from interface:ExternalizableLiteRestore the contents of this object by loading the object's state from the passed DataInput object.- Specified by:
readExternalin 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:ExternalizableLiteSave the contents of this object by storing the object's state into the passed DataOutput object.- Specified by:
writeExternalin 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:PortableObjectRestore the contents of a user type instance by reading its state using the specified PofReader object.- Specified by:
readExternalin 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:PortableObjectSave the contents of a POF user type instance by writing its state using the specified PofWriter object.- Specified by:
writeExternalin 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.Stateof the assignment.- Returns:
- the
ClusteredAssignment.State
-
setState
Sets theClusteredAssignment.Stateof the assignment.- Parameters:
state- theClusteredAssignment.State
-
isRecovered
-
setRecovered
-
getCacheKey
Obtains theNamedCachekey to use for theClusteredAssignment.- Returns:
- the
NamedCachekey for this assignment
-
toString
-
equals
-
hashCode
-
getCacheKey
Obtains theNamedCachekey to use for theClusteredAssignment.- Parameters:
sExecutorId- theExecutoridentitysTaskId- theTaskidentity- Returns:
- the
NamedCachekey 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
-