K - The key type for the underlying cacheV - the value type for the underlying cachepublic interface LocalPublisherManager<K,V>
| Modifier and Type | Method and Description |
|---|---|
<R> SegmentAwarePublisher<R> |
entryPublisher(IntSet segments,
Set<K> keysToInclude,
Set<K> keysToExclude,
boolean includeLoader,
DeliveryGuarantee deliveryGuarantee,
Function<? super org.reactivestreams.Publisher<CacheEntry<K,V>>,? extends org.reactivestreams.Publisher<R>> transformer)
Performs the given transformer on data in the cache that is local, resulting in a stream of values of
possibly varying size.
|
<R> CompletionStage<PublisherResult<R>> |
entryReduction(boolean parallelPublisher,
IntSet segments,
Set<K> keysToInclude,
Set<K> keysToExclude,
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 that is local, resulting in a
single value.
|
<R> SegmentAwarePublisher<R> |
keyPublisher(IntSet segments,
Set<K> keysToInclude,
Set<K> keysToExclude,
boolean includeLoader,
DeliveryGuarantee deliveryGuarantee,
Function<? super org.reactivestreams.Publisher<K>,? extends org.reactivestreams.Publisher<R>> transformer)
Same as
entryPublisher(IntSet, Set, Set, boolean, DeliveryGuarantee, Function)
except that the source publisher provided to the transformer is made up of keys only. |
<R> CompletionStage<PublisherResult<R>> |
keyReduction(boolean parallelPublisher,
IntSet segments,
Set<K> keysToInclude,
Set<K> keysToExclude,
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
entryReduction(boolean, IntSet, Set, Set, boolean, DeliveryGuarantee, Function, Function)
except that the source publisher provided to the transformer is made up of keys only. |
void |
segmentsLost(IntSet lostSegments)
Method to invoke when a set of segments are being removed from this node.
|
<R> CompletionStage<PublisherResult<R>> keyReduction(boolean parallelPublisher, IntSet segments, Set<K> keysToInclude, Set<K> keysToExclude, boolean includeLoader, DeliveryGuarantee deliveryGuarantee, Function<? super org.reactivestreams.Publisher<K>,? extends CompletionStage<R>> transformer, Function<? super org.reactivestreams.Publisher<R>,? extends CompletionStage<R>> finalizer)
entryReduction(boolean, IntSet, Set, Set, boolean, DeliveryGuarantee, Function, Function)
except that the source publisher provided to the transformer is made up of keys only.R - return value type<R> CompletionStage<PublisherResult<R>> entryReduction(boolean parallelPublisher, IntSet segments, Set<K> keysToInclude, Set<K> keysToExclude, 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)
The effects of the provided deliveryGuarantee are as follows:
| Guarantee | Parallel | Behavior> |
|---|---|---|
| AT_MOST_ONCE | TRUE | Each segment is a publisher passed to the transformer individually. Each result of the transformer is supplied to the finalizer. All segments are always complete, ignoring loss of data |
| AT_MOST_ONCE | FALSE | A single publisher for all segments is created and passed to the transformer. That result is returned, finalizer is never used All segments are always complete, ignoring loss of data |
| AT_LEAST_ONCE | TRUE | Same as AT_MOST_ONCE, but if a segment is lost in the middle it is returned as a suspected segment always returning all values |
| AT_LEAST_ONCE | FALSE | Same as AT_MOST_ONCE, but if a segment is lost in the middle it is returned as a suspected segment always returning all values |
| EXACTLY_ONCE | TRUE | Each segment is a publisher passed to the transformer individually. Each result is only accepted if the segment was owned the entire duration of the Subscription. |
| EXACTLY_ONCE | FALSE | Same as EXACTLY_ONCE/TRUE, except the publishers are consumed one at a time. |
R - return value typeparallelPublisher - Whether the publisher should be parallelizedsegments - determines what entries should be evaluated by only using ones that map to the given segments (must not be null)keysToInclude - set of keys that should only be used. May be null, in which case all provided entries for the given segments will be evaluatedkeysToExclude - set of keys that should not be used. May be null, in which case all provided entries will be evaluatedincludeLoader - 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. May be null if not parallel<R> SegmentAwarePublisher<R> keyPublisher(IntSet segments, Set<K> keysToInclude, Set<K> keysToExclude, boolean includeLoader, DeliveryGuarantee deliveryGuarantee, Function<? super org.reactivestreams.Publisher<K>,? extends org.reactivestreams.Publisher<R>> transformer)
entryPublisher(IntSet, Set, Set, boolean, DeliveryGuarantee, Function)
except that the source publisher provided to the transformer is made up of keys only.R - return value type<R> SegmentAwarePublisher<R> entryPublisher(IntSet segments, Set<K> keysToInclude, Set<K> keysToExclude, boolean includeLoader, DeliveryGuarantee deliveryGuarantee, Function<? super org.reactivestreams.Publisher<CacheEntry<K,V>>,? extends org.reactivestreams.Publisher<R>> transformer)
The effects of the provided deliveryGuarantee are as follows:
| Guarantee | Behavior> |
|---|---|
| AT_MOST_ONCE | For each segment a publisher passed to the transformer sequentially. All segments are always complete, ignoring loss of data | AT_LEAST_ONCE | Same as AT_MOST_ONCE, but if a segment is lost in the middle it is returned as a suspected segment possibly dropping values in that segment. | EXACTLY_ONCE | Same as AT_LEAST_ONCE except whenever as segment is lost the value(s) collected in the same response for that segment are always dropped. |
R - return value typesegments - determines what entries should be evaluated by only using ones that map to the given segments (must not be null)keysToInclude - set of keys that should only be used. May be null, in which case all provided entries for the given segments will be evaluatedkeysToExclude - set of keys that should not be used. May be null, in which case all provided entries will be evaluatedincludeLoader - whether to include entries from the underlying cache loader if anydeliveryGuarantee - delivery guarantee for given entriestransformer - transforms the values to another value (0 to many). Must not be null.void segmentsLost(IntSet lostSegments)
lostSegments - the segments that are being removed from this nodeCopyright © 2022 JBoss by Red Hat. All rights reserved.