Class InnerPublisherSubscription<K,I,R,E>
- java.lang.Object
-
- org.infinispan.reactive.publisher.impl.InnerPublisherSubscription<K,I,R,E>
-
- Type Parameters:
R
-
- All Implemented Interfaces:
io.reactivex.rxjava3.functions.Action
,io.reactivex.rxjava3.functions.LongConsumer
public class InnerPublisherSubscription<K,I,R,E> extends Object implements io.reactivex.rxjava3.functions.LongConsumer, io.reactivex.rxjava3.functions.Action
Handles the submission and response handling of an arbitrary amount of address segments. This class will based upon upstream requests send a request to the target address until has retrieved enough entries to satisfy the request threshold. When a given address can no longer return any entries this subscription will try to process the next address/segment combination until it can no longer find any more address/segment targets.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InnerPublisherSubscription.InnerPublisherSubscriptionBuilder<K,I,R>
-
Field Summary
Fields Modifier and Type Field Description protected static org.infinispan.util.logging.Log
log
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(long count)
This method is invoked every time a new request is sent to the underlying publisher.protected void
doOnSegmentComplete(int segment)
Method invoked whenever a segment is completed.protected void
doOnValue(R value, int segment)
Method invoked on each value providing the value and segment.void
run()
This is invoked when the flowable is completed - need to close any pending publishers
-
-
-
Method Detail
-
run
public void run()
This is invoked when the flowable is completed - need to close any pending publishers- Specified by:
run
in interfaceio.reactivex.rxjava3.functions.Action
-
accept
public void accept(long count)
This method is invoked every time a new request is sent to the underlying publisher. We need to submit a request if there is not a pending one. Whenever requestedAmount is a number greater than 0, that means we must submit or there is a pending one.- Specified by:
accept
in interfaceio.reactivex.rxjava3.functions.LongConsumer
- Parameters:
count
- request count
-
doOnValue
protected void doOnValue(R value, int segment)
Method invoked on each value providing the value and segment. This method is designed to be overridden by an extended class.- Parameters:
value
- published valuesegment
- segment of the value
-
doOnSegmentComplete
protected void doOnSegmentComplete(int segment)
Method invoked whenever a segment is completed. This method is designed to be overridden by an extended class.- Parameters:
segment
- completed segment
-
-