-
public interface DistributedCallableContext
Distributed context passed toDistributedCallable.init(DistributedCallableContext)
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NodeAllocationPlan
ensureInitialNodeAllocation()
Returns the initial node allocation of the job.NodeAllocationState.AssignmentState
getAssignmentState()
Returns the assignment state for this callable.FileClient
getFileClient()
Returns the file client to be used within this context<T> T
getLocalSessionAttribute(AttributeScope scope, SessionAttribute<T> attribute)
Looks up the value of a session attribute.<T> void
setLocalSessionAttribute(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
-
-