-
public interface DistributedCallableContextDistributed context passed toDistributedCallable.init(DistributedCallableContext).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NodeAllocationPlanensureInitialNodeAllocation()Returns the initial node allocation of the job.NodeAllocationState.AssignmentStategetAssignmentState()Returns the assignment state for this callable.FileClientgetFileClient()Returns the file client to be used within this context<T> TgetLocalSessionAttribute(AttributeScope scope, SessionAttribute<T> attribute)Looks up the value of a session attribute.<T> voidsetLocalSessionAttribute(AttributeScope scope, SessionAttribute<T> attribute, T value)Sets the value of a session attribute.
-
-
-
Method Detail
-
ensureInitialNodeAllocation
NodeAllocationPlan ensureInitialNodeAllocation()
Returns the initial node allocation of the job. This method forces allocation of nodes if not already allocated.- Returns:
- the initial node allocation of the job
-
getAssignmentState
NodeAllocationState.AssignmentState getAssignmentState()
Returns the assignment state for this callable.- Returns:
- the partition instance information
-
getLocalSessionAttribute
<T> T getLocalSessionAttribute(AttributeScope scope, SessionAttribute<T> attribute)
Looks up the value of a session attribute. Note that session attributes are stored in-memory on the node and will thus be lost in the event of a failure.- Type Parameters:
T- the type of the attribute- Parameters:
scope- a session qualifier to provide uniqueness. attributes are keyed by scope plus attribute type.attribute- the attribute- Returns:
- the value of the attribute
-
setLocalSessionAttribute
<T> void setLocalSessionAttribute(AttributeScope scope, SessionAttribute<T> attribute, T value)
Sets the value of a session attribute. Note that session attributes are stored in-memory on the node and will thus be lost in the event of a failure.- Type Parameters:
T- the type of the attribute- Parameters:
scope- a session qualifier to provide uniqueness. attributes are keyed by scope plus attribute type.attribute- the attributevalue- the value of the attribute
-
getFileClient
FileClient getFileClient()
Returns the file client to be used within this context- Returns:
- the file client
-
-