public class PartitionAwareClusterStreamManager<K> extends ClusterStreamManagerImpl<K>
Modifier and Type | Class and Description |
---|---|
protected class |
PartitionAwareClusterStreamManager.PartitionListener |
ClusterStreamManager.ResultsCallback<R>
Modifier and Type | Field and Description |
---|---|
protected Cache<?,?> |
cache |
protected PartitionAwareClusterStreamManager.PartitionListener |
listener |
currentlyRunning, factory, localAddress, log, requestId, rpc
Constructor and Description |
---|
PartitionAwareClusterStreamManager() |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitCompletion(Object id,
long time,
TimeUnit unit)
Awaits completion of the given request.
|
void |
inject(Cache<?,?> cache) |
<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.
|
void |
start() |
forgetOperation, inject, isComplete, markTrackerWithException, receiveResponse
protected final PartitionAwareClusterStreamManager.PartitionListener listener
protected Cache<?,?> cache
public void inject(Cache<?,?> cache)
public void start()
start
in class ClusterStreamManagerImpl<K>
public boolean awaitCompletion(Object id, long time, TimeUnit unit) throws InterruptedException
ClusterStreamManager
awaitCompletion
in interface ClusterStreamManager<K>
awaitCompletion
in class ClusterStreamManagerImpl<K>
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
public <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)
ClusterStreamManager
remoteStreamOperation
in interface ClusterStreamManager<K>
remoteStreamOperation
in class ClusterStreamManagerImpl<K>
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 resultspublic <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)
ClusterStreamManager
remoteStreamOperation
in interface ClusterStreamManager<K>
remoteStreamOperation
in class ClusterStreamManagerImpl<K>
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 resultspublic <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)
ClusterStreamManager
remoteStreamOperationRehashAware
in interface ClusterStreamManager<K>
remoteStreamOperationRehashAware
in class ClusterStreamManagerImpl<K>
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 resultspublic <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)
ClusterStreamManager
remoteStreamOperationRehashAware
in interface ClusterStreamManager<K>
remoteStreamOperationRehashAware
in class ClusterStreamManagerImpl<K>
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 resultsCopyright © 2022 JBoss, a division of Red Hat. All rights reserved.