Interface Sinks.MulticastReplaySpec

Enclosing class:
Sinks

public static interface Sinks.MulticastReplaySpec
Provides multicast with history/replay capacity : 1 sink, N Subscriber
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> Sinks.Many<T>
    all()
    A Sinks.Many with the following characteristics: Multicast Without Subscriber: all elements pushed to this sink are remembered, even when there is no subscriber. Backpressure : this sink honors downstream demand of individual subscribers. Replaying: all elements pushed to this sink are replayed to new subscribers.
    <T> Sinks.Many<T>
    all(int batchSize)
    A Sinks.Many with the following characteristics: Multicast Without Subscriber: all elements pushed to this sink are remembered, even when there is no subscriber. Backpressure : this sink honors downstream demand of individual subscribers. Replaying: all elements pushed to this sink are replayed to new subscribers.
    <T> Sinks.Many<T>
    A Sinks.Many with the following characteristics: Multicast Without Subscriber: the latest element pushed to this sink are remembered, even when there is no subscriber.
    <T> Sinks.Many<T>
    latestOrDefault(T value)
    A Sinks.Many with the following characteristics: Multicast Without Subscriber: the latest element pushed to this sink are remembered, even when there is no subscriber. Backpressure : this sink honors downstream demand of individual subscribers. Replaying: the latest element pushed to this sink is replayed to new subscribers.
    <T> Sinks.Many<T>
    limit(int historySize)
    A Sinks.Many with the following characteristics: Multicast Without Subscriber: up to historySize elements pushed to this sink are remembered, even when there is no subscriber.
    <T> Sinks.Many<T>
    limit(int historySize, Duration maxAge)
    A Sinks.Many with the following characteristics: Multicast Without Subscriber: up to historySize elements pushed to this sink are remembered, until their maxAge is reached, even when there is no subscriber.
    <T> Sinks.Many<T>
    limit(int historySize, Duration maxAge, Scheduler scheduler)
    A Sinks.Many with the following characteristics: Multicast Without Subscriber: up to historySize elements pushed to this sink are remembered, until their maxAge is reached, even when there is no subscriber.
    <T> Sinks.Many<T>
    limit(Duration maxAge)
    A Sinks.Many with the following characteristics: Multicast Without Subscriber: all elements pushed to this sink are remembered until their maxAge is reached, even when there is no subscriber.
    <T> Sinks.Many<T>
    limit(Duration maxAge, Scheduler scheduler)
    A Sinks.Many with the following characteristics: Multicast Without Subscriber: all elements pushed to this sink are remembered until their maxAge is reached, even when there is no subscriber.
  • Method Details

    • all

      <T> Sinks.Many<T> all()
      A Sinks.Many with the following characteristics:
      • Multicast
      • Without Subscriber: all elements pushed to this sink are remembered, even when there is no subscriber.
      • Backpressure : this sink honors downstream demand of individual subscribers.
      • Replaying: all elements pushed to this sink are replayed to new subscribers.
    • all

      <T> Sinks.Many<T> all(int batchSize)
      A Sinks.Many with the following characteristics:
      • Multicast
      • Without Subscriber: all elements pushed to this sink are remembered, even when there is no subscriber.
      • Backpressure : this sink honors downstream demand of individual subscribers.
      • Replaying: all elements pushed to this sink are replayed to new subscribers.
      Parameters:
      batchSize - the underlying buffer will optimize storage by linked arrays of given size
    • latest

      <T> Sinks.Many<T> latest()
      A Sinks.Many with the following characteristics:
      • Multicast
      • Without Subscriber: the latest element pushed to this sink are remembered, even when there is no subscriber. Older elements are discarded
      • Backpressure : this sink honors downstream demand of individual subscribers.
      • Replaying: the latest element pushed to this sink is replayed to new subscribers.
    • latestOrDefault

      <T> Sinks.Many<T> latestOrDefault(T value)
      A Sinks.Many with the following characteristics:
      • Multicast
      • Without Subscriber: the latest element pushed to this sink are remembered, even when there is no subscriber.
      • Backpressure : this sink honors downstream demand of individual subscribers.
      • Replaying: the latest element pushed to this sink is replayed to new subscribers. If none the default value is replayed
      Parameters:
      value - default value if there is no latest element to replay
    • limit

      <T> Sinks.Many<T> limit(int historySize)
      A Sinks.Many with the following characteristics:
      • Multicast
      • Without Subscriber: up to historySize elements pushed to this sink are remembered, even when there is no subscriber. Older elements are discarded
      • Backpressure : this sink honors downstream demand of individual subscribers.
      • Replaying: up to historySize elements pushed to this sink are replayed to new subscribers. Older elements are discarded.

      Note that though historySize of zero is forbidden, the desired equivalent effect can usually be achieved with the Duration based variant: limit(Duration.ZERO).

      Parameters:
      historySize - maximum number of elements able to replayed, strictly positive
    • limit

      <T> Sinks.Many<T> limit(Duration maxAge)
      A Sinks.Many with the following characteristics:
      • Multicast
      • Without Subscriber: all elements pushed to this sink are remembered until their maxAge is reached, even when there is no subscriber. Older elements are discarded
      • Backpressure : this sink honors downstream demand of individual subscribers.
      • Replaying: up to historySize elements pushed to this sink are replayed to new subscribers. Older elements are discarded.
      Parameters:
      maxAge - maximum retention time for elements to be retained
    • limit

      <T> Sinks.Many<T> limit(Duration maxAge, Scheduler scheduler)
      A Sinks.Many with the following characteristics:
      • Multicast
      • Without Subscriber: all elements pushed to this sink are remembered until their maxAge is reached, even when there is no subscriber. Older elements are discarded
      • Backpressure : this sink honors downstream demand of individual subscribers.
      • Replaying: up to historySize elements pushed to this sink are replayed to new subscribers. Older elements are discarded.
      Note: Age is checked when a signal occurs, not using a background task.
      Parameters:
      maxAge - maximum retention time for elements to be retained
      scheduler - a Scheduler to derive the time from
    • limit

      <T> Sinks.Many<T> limit(int historySize, Duration maxAge)
      A Sinks.Many with the following characteristics:
      • Multicast
      • Without Subscriber: up to historySize elements pushed to this sink are remembered, until their maxAge is reached, even when there is no subscriber. Older elements are discarded
      • Backpressure : this sink honors downstream demand of individual subscribers.
      • Replaying: up to historySize elements pushed to this sink are replayed to new subscribers. Older elements are discarded.
      Note: Age is checked when a signal occurs, not using a background task.

      Note that though historySize of zero is forbidden, the desired equivalent effect can usually be achieved by setting the maxAge to Duration.ZERO.

      Parameters:
      historySize - maximum number of elements able to replayed, strictly positive
      maxAge - maximum retention time for elements to be retained
    • limit

      <T> Sinks.Many<T> limit(int historySize, Duration maxAge, Scheduler scheduler)
      A Sinks.Many with the following characteristics:
      • Multicast
      • Without Subscriber: up to historySize elements pushed to this sink are remembered, until their maxAge is reached, even when there is no subscriber. Older elements are discarded.
      • Backpressure : this sink honors downstream demand of individual subscribers.
      • Replaying: up to historySize elements pushed to this sink are replayed to new subscribers. Older elements are discarded.
      Note: Age is checked when a signal occurs, not using a background task.

      Note that though historySize of zero is forbidden, the desired equivalent effect can usually be achieved by setting the maxAge to Duration.ZERO.

      Parameters:
      historySize - maximum number of elements able to replayed, strictly positive
      maxAge - maximum retention time for elements to be retained
      scheduler - a Scheduler to derive the time from