Interface PausableMulti


public interface PausableMulti
Interface for controlling a pausable Multi stream.

This interface defines the contract for pausing and resuming demand propagation in a reactive stream. Implementations of this interface are typically bound to a DemandPauser to provide external control.

This is an internal interface used by the demand pausing operator. Users should interact with DemandPauser instead.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the current number of buffered items.
    boolean
    Clears the buffer if currently paused.
    boolean
    Checks if demand propagation is currently paused.
    void
    Pauses demand propagation to the upstream.
    void
    Resumes demand propagation to the upstream.
  • Method Details

    • pause

      void pause()
      Pauses demand propagation to the upstream.
    • resume

      void resume()
      Resumes demand propagation to the upstream.
    • isPaused

      boolean isPaused()
      Checks if demand propagation is currently paused.
    • bufferSize

      int bufferSize()
      Returns the current number of buffered items. Only applicable when using BackPressureStrategy.BUFFER.
      Returns:
      the number of buffered items, or 0 if no buffer is used
    • clearBuffer

      boolean clearBuffer()
      Clears the buffer if currently paused. Only applicable when using BackPressureStrategy.BUFFER.
      Returns:
      true if the buffer was cleared, false if not paused or no buffer exists