R- value type
@FunctionalInterface public interface SegmentAwarePublisher<R> extends SegmentCompletionPublisher<R>
SegmentCompletionPublisherexcept that it also allows listening for when a segment is lost. The lost segment provides the same notification guarantees as the segment completion of the parent interface.
This interface is normally just for internal Infinispan usage as users shouldn't normally have to care about retrying.
If segment completion is not needed, use the
Publisher.subscribe(Subscriber) or provided
SegmentCompletionPublisher.EMPTY_CONSUMER as the argument to both of the arguments in the
subscribe(Subscriber, IntConsumer, IntConsumer) method. This allows implementors to optimize for the case
when segment completion/loss is not needed as this may require additional overhead.
|Modifier and Type||Method and Description|
void subscribe(org.reactivestreams.Subscriber<? super R> s, IntConsumer completedSegmentConsumer, IntConsumer lostSegmentConsumer)
SegmentCompletionPublisher.subscribe(Subscriber, IntConsumer), except that we also can notify a listener when a segment has been lost before publishing all its entries
s- subscriber to be notified of values and completion
completedSegmentConsumer- segment notifier to notify
lostSegmentConsumer- segment notifier to notify of lost segments
default void subscribe(org.reactivestreams.Subscriber<? super R> s, IntConsumer completedSegmentConsumer)
Publisher.subscribe(Subscriber), except that we also can notify a listener when a segment has published all of its entries
Copyright © 2021 JBoss by Red Hat. All rights reserved.