Module org.elasticsearch.server
Class NumericDecodePipeline
java.lang.Object
org.elasticsearch.index.codec.tsdb.pipeline.numeric.NumericDecodePipeline
Immutable decoding pipeline: reads payload then reverses transform stages.
Reconstructed from a PipelineDescriptor read from segment metadata,
making the format self-describing. The decoder does not need to know the
pipeline configuration at compile time.
Instances are immutable and thread-safe. Mutable per-block state lives in
DecodingContext, which must be provided by the caller.
-
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of values per block.voiddecode(long[] values, int count, org.apache.lucene.store.DataInput in, DecodingContext context) Decodes a block of values by reading the payload and reversing transforms.static NumericDecodePipelinefromDescriptor(PipelineDescriptor descriptor) Reconstructs a decode pipeline from a persisted descriptor.intsize()Returns the total number of stages (transforms + payload).
-
Method Details
-
fromDescriptor
Reconstructs a decode pipeline from a persisted descriptor.- Parameters:
descriptor- the pipeline descriptor read from segment metadata- Returns:
- the decode pipeline
-
decode
public void decode(long[] values, int count, org.apache.lucene.store.DataInput in, DecodingContext context) throws IOException Decodes a block of values by reading the payload and reversing transforms.- Parameters:
values- the output array to populatecount- the expected number of valuesin- the data input to read fromcontext- the mutable per-block decoding context- Throws:
IOException- if an I/O error occurs
-
blockSize
public int blockSize()Returns the number of values per block.- Returns:
- the number of values per block
-
size
public int size()Returns the total number of stages (transforms + payload).- Returns:
- the total number of stages
-