Module org.elasticsearch.server
Interface PayloadEncoder
- All Known Subinterfaces:
PayloadCodecStage
- All Known Implementing Classes:
BitPackCodecStage
public interface PayloadEncoder
Serializes values to bytes as the terminal stage of the encode pipeline.
Unlike TransformEncoder, payload stages write directly to a
DataOutput rather than modifying values in-place.
-
Method Summary
Modifier and TypeMethodDescriptionvoidencode(long[] values, int valueCount, org.apache.lucene.store.DataOutput out, EncodingContext context) Serializes values to the output stream.byteid()Returns the unique stage identifier.
-
Method Details
-
id
byte id()Returns the unique stage identifier.- Returns:
- the stage ID byte
-
encode
void encode(long[] values, int valueCount, org.apache.lucene.store.DataOutput out, EncodingContext context) throws IOException Serializes values to the output stream.- Parameters:
values- the values to encodevalueCount- the number of valid values in the arrayout- the data output streamcontext- the encoding context with block metadata- Throws:
IOException- if an I/O error occurs
-