Enum Class BufferState

java.lang.Object
java.lang.Enum<BufferState>
io.trino.execution.buffer.BufferState
All Implemented Interfaces:
Serializable, Comparable<BufferState>, Constable

public enum BufferState extends Enum<BufferState>
  • Enum Constant Details

    • OPEN

      public static final BufferState OPEN
      Additional buffers can be added. Any next state is allowed.
    • NO_MORE_BUFFERS

      public static final BufferState NO_MORE_BUFFERS
      No more buffers can be added. Next state is FLUSHING.
    • NO_MORE_PAGES

      public static final BufferState NO_MORE_PAGES
      No more pages can be added. Next state is FLUSHING.
    • FLUSHING

      public static final BufferState FLUSHING
      No more pages or buffers can be added, and buffer is waiting for the final pages to be consumed. Next state is FINISHED.
    • FINISHED

      public static final BufferState FINISHED
      No more buffers can be added and all pages have been consumed. This is the terminal state.
    • ABORTED

      public static final BufferState ABORTED
      Buffer has been aborted. No more buffers or pages can be added. Readers will be blocked, as to not communicate a finished state. It is assumed that the reader will be cleaned up elsewhere. This is the terminal state.
    • FAILED

      public static final BufferState FAILED
      Buffer is failed. No more buffers or pages can be added. The task will be failed. This is the terminal state.
  • Field Details

    • TERMINAL_BUFFER_STATES

      public static final Set<BufferState> TERMINAL_BUFFER_STATES
  • Method Details

    • values

      public static BufferState[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static BufferState valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • canAddPages

      public boolean canAddPages()
    • canAddBuffers

      public boolean canAddBuffers()
    • isTerminal

      public boolean isTerminal()