Module org.elasticsearch.server
Interface TransformEncoder
- All Known Subinterfaces:
NumericCodecStage
- All Known Implementing Classes:
DeltaCodecStage,GcdCodecStage,OffsetCodecStage
public interface TransformEncoder
Transforms values in-place as a non-terminal stage of the encode pipeline.
Unlike PayloadEncoder, transform stages do not write to a
DataOutput. They modify the long[]
array in-place and record any metadata needed for decoding via
EncodingContext.metadata().
-
Method Summary
Modifier and TypeMethodDescriptionvoidencode(long[] values, int valueCount, EncodingContext context) Transforms values in-place and writes any metadata to the context.byteid()Returns the unique stage identifier.
-
Method Details
-
id
byte id()Returns the unique stage identifier.- Returns:
- the stage ID byte
-
encode
Transforms values in-place and writes any metadata to the context.If the stage determines that the transformation would not be effective, it may return without modifying the values or writing metadata. The pipeline checks
EncodingContext.isStageApplied(int)to detect this.- Parameters:
values- the values to transform in-placevalueCount- the number of valid values in the arraycontext- the encoding context for metadata and stage tracking
-