Module mutiny.zero
Package mutiny.zero

Class TubeConfiguration

java.lang.Object
mutiny.zero.TubeConfiguration

public final class TubeConfiguration extends Object
Configuration object for creating Tube through ZeroPublisher.create(TubeConfiguration, Consumer).
  • Constructor Details

    • TubeConfiguration

      public TubeConfiguration()
  • Method Details

    • withBackpressureStrategy

      public TubeConfiguration withBackpressureStrategy(BackpressureStrategy strategy)
      Specify the back-pressure strategy, cannot be null. The default is BackpressureStrategy.DROP.
      Parameters:
      strategy - the back-pressure strategy
      Returns:
      this configuration
    • withBufferSize

      public TubeConfiguration withBufferSize(int bufferSize)
      Specify the buffer size must be strictly positive when backpressureStrategy is one of BackpressureStrategy.BUFFER and BackpressureStrategy.LATEST. The default is -1.
      Parameters:
      bufferSize - the buffer size
      Returns:
      this configuration
    • getBackpressureStrategy

      public BackpressureStrategy getBackpressureStrategy()
      Get the back-pressure strategy.
      Returns:
      the back-pressure strategy
    • getBufferSize

      public int getBufferSize()
      Get the buffer size.
      Returns:
      the buffer size