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 ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(long count) This method is invoked every time a new request is sent to the underlying publisher.protected voiddoOnSegmentComplete(int segment) Method invoked whenever a segment is completed.protected voidMethod invoked on each value providing the value and segment.voidrun()This is invoked when the flowable is completed - need to close any pending publishers
-
Field Details
-
log
protected static final org.infinispan.util.logging.Log log
-
-
Method Details
-
run
public void run()This is invoked when the flowable is completed - need to close any pending publishers- Specified by:
runin 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:
acceptin interfaceio.reactivex.rxjava3.functions.LongConsumer- Parameters:
count- request count
-
doOnValue
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
-