Package io.trino.execution.buffer
Enum Class BufferState
- All Implemented Interfaces:
Serializable,Comparable<BufferState>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBuffer has been aborted.Buffer is failed.No more buffers can be added and all pages have been consumed.No more pages or buffers can be added, and buffer is waiting for the final pages to be consumed.No more buffers can be added.No more pages can be added.Additional buffers can be added. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanstatic BufferStateReturns the enum constant of this class with the specified name.static BufferState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OPEN
Additional buffers can be added. Any next state is allowed. -
NO_MORE_BUFFERS
No more buffers can be added. Next state isFLUSHING. -
NO_MORE_PAGES
No more pages can be added. Next state isFLUSHING. -
FLUSHING
No more pages or buffers can be added, and buffer is waiting for the final pages to be consumed. Next state isFINISHED. -
FINISHED
No more buffers can be added and all pages have been consumed. This is the terminal state. -
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
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
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
canAddPages
public boolean canAddPages() -
canAddBuffers
public boolean canAddBuffers() -
isTerminal
public boolean isTerminal()
-