Interface SegmentAwarePublisher<R>
-
- Type Parameters:
R- value type
- All Superinterfaces:
org.reactivestreams.Publisher<R>,SegmentCompletionPublisher<R>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface SegmentAwarePublisher<R> extends SegmentCompletionPublisher<R>
This is the same asSegmentCompletionPublisherexcept 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 providedSegmentCompletionPublisher.EMPTY_CONSUMERas the argument to both of the arguments in thesubscribe(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.
-
-
Field Summary
-
Fields inherited from interface org.infinispan.reactive.publisher.impl.SegmentCompletionPublisher
EMPTY_CONSUMER
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidsubscribe(org.reactivestreams.Subscriber<? super R> s, IntConsumer completedSegmentConsumer)Same asPublisher.subscribe(Subscriber), except that we also can notify a listener when a segment has published all of its entriesvoidsubscribe(org.reactivestreams.Subscriber<? super R> s, IntConsumer completedSegmentConsumer, IntConsumer lostSegmentConsumer)Same asSegmentCompletionPublisher.subscribe(Subscriber, IntConsumer), except that we also can notify a listener when a segment has been lost before publishing all its entries-
Methods inherited from interface org.infinispan.reactive.publisher.impl.SegmentCompletionPublisher
subscribe
-
-
-
-
Method Detail
-
subscribe
void subscribe(org.reactivestreams.Subscriber<? super R> s, IntConsumer completedSegmentConsumer, IntConsumer lostSegmentConsumer)
Same asSegmentCompletionPublisher.subscribe(Subscriber, IntConsumer), except that we also can notify a listener when a segment has been lost before publishing all its entries- Parameters:
s- subscriber to be notified of values and completioncompletedSegmentConsumer- segment notifier to notifylostSegmentConsumer- segment notifier to notify of lost segments
-
subscribe
default void subscribe(org.reactivestreams.Subscriber<? super R> s, IntConsumer completedSegmentConsumer)
Description copied from interface:SegmentCompletionPublisherSame asPublisher.subscribe(Subscriber), except that we also can notify a listener when a segment has published all of its entries- Specified by:
subscribein interfaceSegmentCompletionPublisher<R>- Parameters:
s- subscriber to be notified of values and completioncompletedSegmentConsumer- segment notifier to notify
-
-