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 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final org.infinispan.util.logging.Log
     
  • Method Summary

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      run in interface io.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 interface io.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 value
      segment - 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