Interface Sinks.UnicastSpec

Enclosing class:
Sinks

public static interface Sinks.UnicastSpec
Provides unicast: 1 sink, 1 Subscriber
  • Method Details

    • onBackpressureBuffer

      <T> Sinks.Many<T> onBackpressureBuffer()
      A Sinks.Many with the following characteristics:
      • Unicast: contrary to most other Sinks.Many, the Flux view rejects subscribers past the first one.
      • Backpressure : this sink honors downstream demand of its single Subscriber.
      • Replaying: non-applicable, since only one Subscriber can register.
      • Without Subscriber: all elements pushed to this sink are remembered and will be replayed once the Subscriber subscribes.
    • onBackpressureBuffer

      <T> Sinks.Many<T> onBackpressureBuffer(Queue<T> queue)
      A Sinks.Many with the following characteristics:
      • Unicast: contrary to most other Sinks.Many, the Flux view rejects subscribers past the first one.
      • Backpressure : this sink honors downstream demand of its single Subscriber.
      • Replaying: non-applicable, since only one Subscriber can register.
      • Without Subscriber: depending on the queue, all elements pushed to this sink are remembered and will be replayed once the Subscriber subscribes.
      Parameters:
      queue - an arbitrary queue to use that must at least support Single Producer / Single Consumer semantics
    • onBackpressureBuffer

      <T> Sinks.Many<T> onBackpressureBuffer(Queue<T> queue, Disposable endCallback)
      A Sinks.Many with the following characteristics:
      • Unicast: contrary to most other Sinks.Many, the Flux view rejects subscribers past the first one.
      • Backpressure : this sink honors downstream demand of its single Subscriber.
      • Replaying: non-applicable, since only one Subscriber can register.
      • Without Subscriber: depending on the queue, all elements pushed to this sink are remembered and will be replayed once the Subscriber subscribes.
      Parameters:
      queue - an arbitrary queue to use that must at least support Single Producer / Single Consumer semantics
      endCallback - when a terminal signal is observed: error, complete or cancel
    • onBackpressureError

      <T> Sinks.Many<T> onBackpressureError()
      A Sinks.Many with the following characteristics:
      • Unicast: contrary to most other Sinks.Many, the Flux view rejects subscribers past the first one.
      • Backpressure : this sink honors downstream demand of the Subscriber, and will emit Subscriber.onError(Throwable) if there is a mismatch.
      • Replaying: No replay. Only forwards to a Subscriber the elements that have been pushed to the sink AFTER this subscriber was subscribed.