Package io.prestosql.execution.buffer
Enum BufferState
- java.lang.Object
-
- java.lang.Enum<BufferState>
-
- io.prestosql.execution.buffer.BufferState
-
- All Implemented Interfaces:
Serializable
,Comparable<BufferState>
public enum BufferState extends Enum<BufferState>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FAILED
Buffer has failed.FINISHED
No more buffers can be added and all pages have been consumed.FLUSHING
No more pages or buffers can be added, and buffer is waiting for the final pages to be consumed.NO_MORE_BUFFERS
No more buffers can be added.NO_MORE_PAGES
No more pages can be added.OPEN
Additional buffers can be added.
-
Field Summary
Fields Modifier and Type Field Description static Set<BufferState>
TERMINAL_BUFFER_STATES
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canAddBuffers()
boolean
canAddPages()
boolean
isTerminal()
static BufferState
valueOf(String name)
Returns the enum constant of this type with the specified name.static BufferState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 isFLUSHING
.
-
NO_MORE_PAGES
public static final BufferState NO_MORE_PAGES
No more pages can be added. Next state isFLUSHING
.
-
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 isFINISHED
.
-
FINISHED
public static final BufferState FINISHED
No more buffers can be added and all pages have been consumed. This is the terminal state.
-
FAILED
public static final BufferState FAILED
Buffer has failed. 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.
-
-
Field Detail
-
TERMINAL_BUFFER_STATES
public static final Set<BufferState> TERMINAL_BUFFER_STATES
-
-
Method Detail
-
values
public static BufferState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (BufferState c : BufferState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BufferState valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
canAddPages
public boolean canAddPages()
-
canAddBuffers
public boolean canAddBuffers()
-
isTerminal
public boolean isTerminal()
-
-