Module org.elasticsearch.server
Enum Class StageId
- All Implemented Interfaces:
Serializable,Comparable<StageId>,Constable
Unique byte identifiers for pipeline stages, persisted in the encoded data.
Stage IDs are the wire format contract between encoder and decoder. Once assigned,
an ID must never change or be reused, as doing so would break the
ability to decode existing data. ID 0x00 is reserved for test-only stages
(see TestPayloadCodecStage).
Transform stages (IDs below 0xA1) are applied in sequence and are reversible.
Terminal payload stages (IDs at or above 0xA1) serialize values to bytes as the
final step of the encode pipeline. ID 0xA0 is reserved for test-only payload stages.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBit-packing terminal payload stage.Delta encoding transform stage.GCD factoring transform stage.Offset removal transform stage. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringHuman-readable name for logging and diagnostics.final bytePersisted byte identifier. -
Method Summary
Modifier and TypeMethodDescriptionstatic StageIdfromId(byte id) Resolves a persisted byte identifier back to itsStageIdconstant.static StageIdReturns the enum constant of this class with the specified name.static StageId[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DELTA_STAGE
Delta encoding transform stage. -
OFFSET_STAGE
Offset removal transform stage. -
GCD_STAGE
GCD factoring transform stage. -
BITPACK_PAYLOAD
Bit-packing terminal payload stage.
-
-
Field Details
-
id
public final byte idPersisted byte identifier. Must never change once assigned. -
displayName
Human-readable name for logging and diagnostics.
-
-
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
-
fromId
Resolves a persisted byte identifier back to itsStageIdconstant.- Parameters:
id- the byte identifier read from the encoded data- Returns:
- the corresponding
StageId - Throws:
IllegalArgumentException- if the identifier is unknown
-