Interface ReplayStrategy<T>

Type Parameters:
T - The type of data.

public interface ReplayStrategy<T>
Used to customize the strategy for the Publisher replay operator.
  • Method Details

    • minSubscribers

      int minSubscribers()
      Get the minimum number of downstream subscribers before subscribing upstream.
      Returns:
      the minimum number of downstream subscribers before subscribing upstream.
    • accumulatorSupplier

      Supplier<ReplayAccumulator<T>> accumulatorSupplier()
      Get a Supplier that provides the ReplayAccumulator on each upstream subscribe.
      Returns:
      a Supplier that provides the ReplayAccumulator on each upstream subscribe.
    • cancelUpstream

      boolean cancelUpstream()
      Determine if all the downstream subscribers cancel, should upstream be cancelled.
      Returns:
      true if all the downstream subscribers cancel, should upstream be cancelled. false will not cancel upstream if all downstream subscribers cancel.
    • queueLimitHint

      int queueLimitHint()
      Get a hint to limit the number of elements which will be queued for each PublisherSource.Subscriber in order to compensate for unequal demand and late subscribers.
      Returns:
      a hint to limit the number of elements which will be queued for each PublisherSource.Subscriber in order to compensate for unequal demand and late subscribers.
    • terminalResubscribe

      Function<Throwable,Completable> terminalResubscribe()
      Get a Function that is invoked when a terminal signal arrives from upstream and determines when state is reset to allow for upstream resubscribe.
      Returns:
      A Function that is invoked when a terminal signal arrives from upstream, and returns a Completable whose termination resets the state of the returned Publisher and allows for downstream resubscribing. The argument to this function is as follows: