public class PartitionAwareClusterPublisherManager<K,V> extends ClusterPublisherManagerImpl<K,V>
Modifier and Type | Field and Description |
---|---|
protected ComponentRef<Cache<?,?>> |
cache |
protected org.infinispan.reactive.publisher.impl.PartitionAwareClusterPublisherManager.PartitionListener |
listener |
log, rpcOptions, trace
Constructor and Description |
---|
PartitionAwareClusterPublisherManager() |
Modifier and Type | Method and Description |
---|---|
<R> SegmentCompletionPublisher<R> |
entryPublisher(IntSet segments,
Set<K> keysToInclude,
InvocationContext invocationContext,
boolean includeLoader,
DeliveryGuarantee deliveryGuarantee,
int batchSize,
Function<? super org.reactivestreams.Publisher<CacheEntry<K,V>>,? extends org.reactivestreams.Publisher<R>> transformer)
Performs the given transformer on data in the cache, resulting in multiple values.
|
<R> CompletionStage<R> |
entryReduction(boolean parallelPublisher,
IntSet segments,
Set<K> keysToInclude,
InvocationContext ctx,
boolean includeLoader,
DeliveryGuarantee deliveryGuarantee,
Function<? super org.reactivestreams.Publisher<CacheEntry<K,V>>,? extends CompletionStage<R>> transformer,
Function<? super org.reactivestreams.Publisher<R>,? extends CompletionStage<R>> finalizer)
Performs the given transformer and finalizer on data in the cache, resulting in a single value.
|
<R> SegmentCompletionPublisher<R> |
keyPublisher(IntSet segments,
Set<K> keysToInclude,
InvocationContext invocationContext,
boolean includeLoader,
DeliveryGuarantee deliveryGuarantee,
int batchSize,
Function<? super org.reactivestreams.Publisher<K>,? extends org.reactivestreams.Publisher<R>> transformer)
Same as
ClusterPublisherManager.entryPublisher(IntSet, Set, InvocationContext, boolean, DeliveryGuarantee, int, Function)
except that the source publisher provided to the transformer is made up of keys only. |
<R> CompletionStage<R> |
keyReduction(boolean parallelPublisher,
IntSet segments,
Set<K> keysToInclude,
InvocationContext ctx,
boolean includeLoader,
DeliveryGuarantee deliveryGuarantee,
Function<? super org.reactivestreams.Publisher<K>,? extends CompletionStage<R>> transformer,
Function<? super org.reactivestreams.Publisher<R>,? extends CompletionStage<R>> finalizer)
Same as
ClusterPublisherManager.entryReduction(boolean, IntSet, Set, InvocationContext, boolean, DeliveryGuarantee, Function, Function)
except that the source publisher provided to the transformer is made up of keys only. |
void |
start() |
protected final org.infinispan.reactive.publisher.impl.PartitionAwareClusterPublisherManager.PartitionListener listener
protected ComponentRef<Cache<?,?>> cache
public PartitionAwareClusterPublisherManager()
public void start()
start
in class ClusterPublisherManagerImpl<K,V>
public <R> CompletionStage<R> keyReduction(boolean parallelPublisher, IntSet segments, Set<K> keysToInclude, InvocationContext ctx, boolean includeLoader, DeliveryGuarantee deliveryGuarantee, Function<? super org.reactivestreams.Publisher<K>,? extends CompletionStage<R>> transformer, Function<? super org.reactivestreams.Publisher<R>,? extends CompletionStage<R>> finalizer)
ClusterPublisherManager
ClusterPublisherManager.entryReduction(boolean, IntSet, Set, InvocationContext, boolean, DeliveryGuarantee, Function, Function)
except that the source publisher provided to the transformer is made up of keys only.keyReduction
in interface ClusterPublisherManager<K,V>
keyReduction
in class ClusterPublisherManagerImpl<K,V>
R
- return value typepublic <R> CompletionStage<R> entryReduction(boolean parallelPublisher, IntSet segments, Set<K> keysToInclude, InvocationContext ctx, boolean includeLoader, DeliveryGuarantee deliveryGuarantee, Function<? super org.reactivestreams.Publisher<CacheEntry<K,V>>,? extends CompletionStage<R>> transformer, Function<? super org.reactivestreams.Publisher<R>,? extends CompletionStage<R>> finalizer)
ClusterPublisherManager
entryReduction
in interface ClusterPublisherManager<K,V>
entryReduction
in class ClusterPublisherManagerImpl<K,V>
R
- return value typeparallelPublisher
- Whether on each node the publisher should be parallelized remotely and locallysegments
- determines what entries should be evaluated by only using ones that map to the given segments (if null assumes all segments)keysToInclude
- set of keys that should only be used (if null all entries for the given segments will be evaluated)ctx
- context of the invoking operation, context entries override the values in the cache (may be null)includeLoader
- whether to include entries from the underlying cache loader if anydeliveryGuarantee
- delivery guarantee for given entriestransformer
- reduces the given publisher of data eventually into a single value. Must not be null.finalizer
- reduces all of the single values produced by the transformer or this finalizer into one final value. Must not be null.public <R> SegmentCompletionPublisher<R> keyPublisher(IntSet segments, Set<K> keysToInclude, InvocationContext invocationContext, boolean includeLoader, DeliveryGuarantee deliveryGuarantee, int batchSize, Function<? super org.reactivestreams.Publisher<K>,? extends org.reactivestreams.Publisher<R>> transformer)
ClusterPublisherManager
ClusterPublisherManager.entryPublisher(IntSet, Set, InvocationContext, boolean, DeliveryGuarantee, int, Function)
except that the source publisher provided to the transformer is made up of keys only.keyPublisher
in interface ClusterPublisherManager<K,V>
keyPublisher
in class ClusterPublisherManagerImpl<K,V>
R
- return value typepublic <R> SegmentCompletionPublisher<R> entryPublisher(IntSet segments, Set<K> keysToInclude, InvocationContext invocationContext, boolean includeLoader, DeliveryGuarantee deliveryGuarantee, int batchSize, Function<? super org.reactivestreams.Publisher<CacheEntry<K,V>>,? extends org.reactivestreams.Publisher<R>> transformer)
ClusterPublisherManager
ClusterPublisherManager.entryReduction(boolean, IntSet, Set, InvocationContext, boolean, DeliveryGuarantee, Function, Function)
instead as it can optimize some things. Depending on the deliveryGuarantee the transformer may be
invoked 1..numSegments times per node. Results from a given node will retrieve values up to
batchSize
values until some are consumed.entryPublisher
in interface ClusterPublisherManager<K,V>
entryPublisher
in class ClusterPublisherManagerImpl<K,V>
R
- return value typesegments
- determines what entries should be evaluated by only using ones that map to the given segments (if null assumes all segments)keysToInclude
- set of keys that should only be used (if null all entries for the given segments will be evaluated)invocationContext
- context of the invoking operation, context entries override the values in the cache (may be null)includeLoader
- whether to include entries from the underlying cache loader if anydeliveryGuarantee
- delivery guarantee for given entriesbatchSize
- how many entries to be returned at a given timetransformer
- transform the given stream of data into something else (requires non null)Copyright © 2021 JBoss by Red Hat. All rights reserved.