K
- The key type for the underlying cachepublic interface ClusterStreamManager<K>
forgetOperation(Object)
so that the operation is fully released. This is important especially for early terminating operations.Modifier and Type | Interface and Description |
---|---|
static interface |
ClusterStreamManager.ResultsCallback<R>
A callback that is used for result processing from the remote nodes.
|
Modifier and Type | Method and Description |
---|---|
boolean |
awaitCompletion(Object id,
long time,
TimeUnit unit)
Awaits completion of the given request.
|
void |
forgetOperation(Object id)
Frees any resources related to this operation and signals to any ongoing remote operations to no longer continue
processing
|
boolean |
isComplete(Object id)
Tests whether this operation is still pending or not.
|
<R1> boolean |
receiveResponse(Object id,
Address origin,
boolean complete,
Set<Integer> segments,
R1 response)
Receives a response for a given request
|
<R> Object |
remoteStreamOperation(boolean parallelDistribution,
boolean parallelStream,
ConsistentHash ch,
Set<Integer> segments,
Set<K> keysToInclude,
Map<Integer,Set<K>> keysToExclude,
boolean includeLoader,
KeyTrackingTerminalOperation<K,R,?> operation,
ClusterStreamManager.ResultsCallback<Collection<R>> callback)
Key tracking remote operation that doesn't have rehash enabled.
|
<R> Object |
remoteStreamOperation(boolean parallelDistribution,
boolean parallelStream,
ConsistentHash ch,
Set<Integer> segments,
Set<K> keysToInclude,
Map<Integer,Set<K>> keysToExclude,
boolean includeLoader,
TerminalOperation<R> operation,
ClusterStreamManager.ResultsCallback<R> callback,
Predicate<? super R> earlyTerminatePredicate)
Performs the remote stream operation without rehash awareness.
|
<R2> Object |
remoteStreamOperationRehashAware(boolean parallelDistribution,
boolean parallelStream,
ConsistentHash ch,
Set<Integer> segments,
Set<K> keysToInclude,
Map<Integer,Set<K>> keysToExclude,
boolean includeLoader,
KeyTrackingTerminalOperation<K,?,R2> operation,
ClusterStreamManager.ResultsCallback<Map<K,R2>> callback)
Key tracking remote operation that has rehash enabled
|
<R> Object |
remoteStreamOperationRehashAware(boolean parallelDistribution,
boolean parallelStream,
ConsistentHash ch,
Set<Integer> segments,
Set<K> keysToInclude,
Map<Integer,Set<K>> keysToExclude,
boolean includeLoader,
TerminalOperation<R> operation,
ClusterStreamManager.ResultsCallback<R> callback,
Predicate<? super R> earlyTerminatePredicate)
Performs the remote stream operation with rehash awareness.
|
<R> Object remoteStreamOperation(boolean parallelDistribution, boolean parallelStream, ConsistentHash ch, Set<Integer> segments, Set<K> keysToInclude, Map<Integer,Set<K>> keysToExclude, boolean includeLoader, TerminalOperation<R> operation, ClusterStreamManager.ResultsCallback<R> callback, Predicate<? super R> earlyTerminatePredicate)
R
- the type of responseparallelDistribution
- whether or not parallel distribution is enabledparallelStream
- whether or not the stream is paralllelch
- the consistent hash to use when determining segment ownershipsegments
- the segments that this request should utilizekeysToInclude
- which keys to include in the requestkeysToExclude
- which keys to exclude in the requestincludeLoader
- whether or not to use a loaderoperation
- the actual operation to performcallback
- the callback to collect individual node resultsearlyTerminatePredicate
- a predicate to determine if this operation should stop based on intermediate results<R> Object remoteStreamOperationRehashAware(boolean parallelDistribution, boolean parallelStream, ConsistentHash ch, Set<Integer> segments, Set<K> keysToInclude, Map<Integer,Set<K>> keysToExclude, boolean includeLoader, TerminalOperation<R> operation, ClusterStreamManager.ResultsCallback<R> callback, Predicate<? super R> earlyTerminatePredicate)
R
- the type of responseparallelDistribution
- whether or not parallel distribution is enabledparallelStream
- whether or not the stream is paralllelch
- the consistent hash to use when determining segment ownershipsegments
- the segments that this request should utilizekeysToInclude
- which keys to include in the requestkeysToExclude
- which keys to exclude in the requestincludeLoader
- whether or not to use a loaderoperation
- the actual operation to performcallback
- the callback to collect individual node resultsearlyTerminatePredicate
- a predicate to determine if this operation should stop based on intermediate results<R> Object remoteStreamOperation(boolean parallelDistribution, boolean parallelStream, ConsistentHash ch, Set<Integer> segments, Set<K> keysToInclude, Map<Integer,Set<K>> keysToExclude, boolean includeLoader, KeyTrackingTerminalOperation<K,R,?> operation, ClusterStreamManager.ResultsCallback<Collection<R>> callback)
R
- the type of responseparallelDistribution
- whether or not parallel distribution is enabledparallelStream
- whether or not the stream is paralllelch
- the consistent hash to use when determining segment ownershipsegments
- the segments that this request should utilizekeysToInclude
- which keys to include in the requestkeysToExclude
- which keys to exclude in the requestincludeLoader
- whether or not to use a loaderoperation
- the actual operation to performcallback
- the callback to collect individual node results<R2> Object remoteStreamOperationRehashAware(boolean parallelDistribution, boolean parallelStream, ConsistentHash ch, Set<Integer> segments, Set<K> keysToInclude, Map<Integer,Set<K>> keysToExclude, boolean includeLoader, KeyTrackingTerminalOperation<K,?,R2> operation, ClusterStreamManager.ResultsCallback<Map<K,R2>> callback)
R2
- the type of responseparallelDistribution
- whether or not parallel distribution is enabledparallelStream
- whether or not the stream is paralllelch
- the consistent hash to use when determining segment ownershipsegments
- the segments that this request should utilizekeysToInclude
- which keys to include in the requestkeysToExclude
- which keys to exclude in the requestincludeLoader
- whether or not to use a loaderoperation
- the actual operation to performcallback
- the callback to collect individual node resultsboolean isComplete(Object id)
id
- the id of the operation that was returned from the invocationboolean awaitCompletion(Object id, long time, TimeUnit unit) throws InterruptedException
id
- the ide of the operation that was returned from the invocation - must be non nulltime
- how long to wait before returning false - must be greater than 0unit
- controls how long the time wait isInterruptedException
void forgetOperation(Object id)
id
- the ide of the operation that was returned from the invocation - can be null in which case this is a noop<R1> boolean receiveResponse(Object id, Address origin, boolean complete, Set<Integer> segments, R1 response)
R1
- The type of the responseid
- The request idorigin
- The origin of the responsecomplete
- Whether or not this is a completed responsesegments
- The segments that were suspectedresponse
- The actual response valueCopyright © 2023 JBoss, a division of Red Hat. All rights reserved.