public interface DistributedCallableContext
Distributed context passed to
DistributedCallable.init(DistributedCallableContext).-
Method Summary
Modifier and TypeMethodDescriptionReturns the initial node allocation of the job.Returns the assignment state for this callable.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 Details
-
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
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
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
-