Class ClusteredAssignment
- java.lang.Object
-
- com.oracle.coherence.concurrent.executor.ClusteredAssignment
-
- All Implemented Interfaces:
com.tangosol.io.ExternalizableLite,com.tangosol.io.pof.PortableObject,Serializable
public class ClusteredAssignment extends Object implements com.tangosol.io.ExternalizableLite, com.tangosol.io.pof.PortableObject
- Since:
- 21.06
- Author:
- bo
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClusteredAssignment.AssignmentProcessorAnInvocableMap.EntryProcessorwhich updates an assignment due to an assignmentExecutionPlan.Action.static classClusteredAssignment.SetStateProcessorAnInvocableMap.EntryProcessorto compare and set the state of aClusteredAssignment, returning the previous state.static classClusteredAssignment.StateThe current state of the assignment.
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_fRecoveredprotected Stringm_sExecutorIdTheExecutoridentity.protected Stringm_sTaskIdTheTaskidentity.protected ClusteredAssignment.Statem_stateTheClusteredAssignment.Stateof the assignment.
-
Constructor Summary
Constructors Constructor Description ClusteredAssignment()Constructs aClusteredAssignment(required for serialization).ClusteredAssignment(String executorId, String sTaskId)Constructs aClusteredAssignment.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcancelAssignments(String sTaskId, com.tangosol.net.CacheService service)Cancels all assignments that are currently running.booleanequals(Object o)StringgetCacheKey()Obtains theNamedCachekey to use for theClusteredAssignment.static StringgetCacheKey(String sExecutorId, String sTaskId)Obtains theNamedCachekey to use for theClusteredAssignment.StringgetExecutorId()Obtains theExecutoridentity.ClusteredAssignment.StategetState()Obtains theClusteredAssignment.Stateof the assignment.StringgetTaskId()Obtains theTaskidentity.inthashCode()booleanisRecovered()voidreadExternal(com.tangosol.io.pof.PofReader in)voidreadExternal(DataInput in)static voidregisterAssignments(String sTaskId, ExecutionPlan executionPlan, com.tangosol.net.CacheService service)Process a list of assignments for a task.static voidremoveAssignments(String sTaskId, com.tangosol.net.CacheService service)Remove assignments for a task.voidsetRecovered(boolean fRecovered)voidsetState(ClusteredAssignment.State state)Sets theClusteredAssignment.Stateof the assignment.StringtoString()voidwriteExternal(com.tangosol.io.pof.PofWriter out)voidwriteExternal(DataOutput out)
-
-
-
Field Detail
-
m_state
protected ClusteredAssignment.State m_state
TheClusteredAssignment.Stateof the assignment.
-
m_fRecovered
protected boolean m_fRecovered
-
-
Constructor Detail
-
ClusteredAssignment
public ClusteredAssignment()
Constructs aClusteredAssignment(required for serialization).
-
ClusteredAssignment
public ClusteredAssignment(String executorId, String sTaskId)
Constructs aClusteredAssignment.
-
-
Method Detail
-
readExternal
public void readExternal(DataInput in) throws IOException
- Specified by:
readExternalin interfacecom.tangosol.io.ExternalizableLite- Throws:
IOException
-
writeExternal
public void writeExternal(DataOutput out) throws IOException
- Specified by:
writeExternalin interfacecom.tangosol.io.ExternalizableLite- Throws:
IOException
-
readExternal
public void readExternal(com.tangosol.io.pof.PofReader in) throws IOException- Specified by:
readExternalin interfacecom.tangosol.io.pof.PortableObject- Throws:
IOException
-
writeExternal
public void writeExternal(com.tangosol.io.pof.PofWriter out) throws IOException- Specified by:
writeExternalin interfacecom.tangosol.io.pof.PortableObject- Throws:
IOException
-
getExecutorId
public String getExecutorId()
Obtains theExecutoridentity.- Returns:
- the
Executoridentity
-
getState
public ClusteredAssignment.State getState()
Obtains theClusteredAssignment.Stateof the assignment.- Returns:
- the
ClusteredAssignment.State
-
setState
public void setState(ClusteredAssignment.State state)
Sets theClusteredAssignment.Stateof the assignment.- Parameters:
state- theClusteredAssignment.State
-
isRecovered
public boolean isRecovered()
- Returns:
trueif previously assigned to a differentExecutor,falseotherwise
-
setRecovered
public void setRecovered(boolean fRecovered)
- Parameters:
fRecovered-trueif previously assigned to a differentExecutor,falseotherwise
-
getCacheKey
public String getCacheKey()
Obtains theNamedCachekey to use for theClusteredAssignment.- Returns:
- the
NamedCachekey for this assignment
-
getCacheKey
public static String getCacheKey(String sExecutorId, String sTaskId)
Obtains theNamedCachekey to use for theClusteredAssignment.
-
registerAssignments
public static void registerAssignments(String sTaskId, ExecutionPlan executionPlan, com.tangosol.net.CacheService service)
Process a list of assignments for a task.- Parameters:
sTaskId- the taskexecutionPlan- the list of assignmentsservice- theCacheService
-
cancelAssignments
public static void cancelAssignments(String sTaskId, com.tangosol.net.CacheService service)
Cancels all assignments that are currently running.- Parameters:
sTaskId- the taskservice- theCacheService
-
removeAssignments
public static void removeAssignments(String sTaskId, com.tangosol.net.CacheService service)
Remove assignments for a task.- Parameters:
sTaskId- the taskservice- theCacheService
-
-