Class ClusterPublisherManagerImpl.TopologySegmentAwarePublisherImpl
java.lang.Object
ClusterPublisherManagerImpl<K,V>.org.infinispan.reactive.publisher.impl.ClusterPublisherManagerImpl.SegmentAwarePublisherImpl<CacheEntry<K,V>, CacheEntry<K,V>>
org.infinispan.reactive.publisher.impl.ClusterPublisherManagerImpl.TopologySegmentAwarePublisherImpl
- All Implemented Interfaces:
SegmentPublisherSupplier<CacheEntry<K,V>>
- Enclosing class:
ClusterPublisherManagerImpl<K,V>
protected class ClusterPublisherManagerImpl.TopologySegmentAwarePublisherImpl
extends ClusterPublisherManagerImpl<K,V>.SegmentAwarePublisherImpl<CacheEntry<K,V>, CacheEntry<K,V>>
- Since:
- 10.0
- Author:
- wburns
-
Nested Class Summary
Nested classes/interfaces inherited from interface SegmentPublisherSupplier
SegmentPublisherSupplier.Notification<R> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTopologySegmentAwarePublisherImpl(int topologyId, int batchSize, Map<Address, IntSet> targets) protectedTopologySegmentAwarePublisherImpl(int topologyId, int batchSize, Map<Address, IntSet> targets, Function<? super org.reactivestreams.Publisher<CacheEntry<K, V>>, ? extends org.reactivestreams.Publisher<CacheEntry<K, V>>> transformer) -
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<CacheEntry<K, V>> Returns a publisher that can be used to subscribe to the values available.org.reactivestreams.Publisher<SegmentPublisherSupplier.Notification<CacheEntry<K, V>>> APublisherthat will publish entries as originally configured from possibly remote sources.
-
Constructor Details
-
TopologySegmentAwarePublisherImpl
-
TopologySegmentAwarePublisherImpl
protected TopologySegmentAwarePublisherImpl(int topologyId, int batchSize, Map<Address, IntSet> targets, Function<? super org.reactivestreams.Publisher<CacheEntry<K, V>>, ? extends org.reactivestreams.Publisher<CacheEntry<K, V>>> transformer)
-
-
Method Details
-
publisherWithSegments
public org.reactivestreams.Publisher<SegmentPublisherSupplier.Notification<CacheEntry<K,V>>> publisherWithSegments()Description copied from interface:SegmentPublisherSupplierAPublisherthat will publish entries as originally configured from possibly remote sources. The published items will be wrapped in aSegmentPublisherSupplier.Notificationwhich can be either an item or segment completion notification. The type can be verified by first invokingSegmentPublisherSupplier.Notification.isValue()orSegmentPublisherSupplier.Notification.isSegmentComplete()after which the value or segment information should be retrieved. Note that each value will also have a segment attributed to it which can be access by invokingSegmentPublisherSupplier.Notification.valueSegment().Note that segment completion can be interwoven with values and some segments may have no items present. However, once a segment complete notification is encountered for a given segment no additional values will be published to the same subscriber for the given segment.
If segment information is not required, please use
SegmentPublisherSupplier.publisherWithoutSegments()as implementations may have additional optimizations in place for when this information is not required.- Specified by:
publisherWithSegmentsin interfaceSegmentPublisherSupplier<I>- Returns:
- a Publisher that publishes the resulting values with segment information
-
publisherWithoutSegments
Description copied from interface:SegmentPublisherSupplierReturns a publisher that can be used to subscribe to the values available.- Specified by:
publisherWithoutSegmentsin interfaceSegmentPublisherSupplier<I>- Returns:
- a Publisher that publishes the resulting values without corresponding segment information
-