- Type Parameters:
T- the result type
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DistributedCommand
A distributed equivalent of a
Callable. A
DistributedCallable will be serialized to all nodes and will be
be invoked once per VirtualNodeID. The callable will be run and its
results will be merged together by calling merge(List).-
Method Summary
Modifier and TypeMethodDescriptionInvoked once perVirtualNodeID.Invoked to perform a merge of results.
-
Method Details
-
init
Invoked once perVirtualNodeID. This method will be called on the remote side.- Parameters:
ctx- a remote context from which the callable can obtain its distributed identity, etc.- Returns:
- the actual callable to invoke.
-
merge
Invoked to perform a merge of results. Implementations should not make any assumptions about the order of the results (specifically, the order of the results will not necessarily be the same as partition ids). This also may be invoked multiple times to allow hierarchical merging.- Parameters:
results- the results- Returns:
- the merged results.
-