Record Class PipelineConfig

java.lang.Object
java.lang.Record
org.elasticsearch.index.codec.tsdb.pipeline.PipelineConfig
Record Components:
dataType - the numeric data type
blockSize - the number of values per block (must be a positive power of 2)
transforms - the ordered transform stage specifications
payload - the terminal payload stage specification

public record PipelineConfig(PipelineDescriptor.DataType dataType, int blockSize, List<StageSpec.TransformSpec> transforms, StageSpec.PayloadSpec payload) extends Record
Immutable specification for a field's encoding pipeline.

Captures the data type, block size, ordered transform stages, and terminal payload stage. The builder separates transforms from the payload at construction time, making illegal states (e.g. two payloads, payload in the middle) unrepresentable.

Use forLongs(int) to start building a configuration via the fluent builder API.

  • Constructor Details

  • Method Details

    • forLongs

      public static PipelineConfig.LongBuilder forLongs(int blockSize)
      Starts building a long (integral) pipeline configuration.
      Parameters:
      blockSize - the number of values per block
      Returns:
      a new builder for long pipelines
    • specs

      public List<StageSpec> specs()
      Returns all stage specifications in order (transforms followed by payload).
      Returns:
      unmodifiable list of all specs
    • describeStages

      public String describeStages()
      Returns a human-readable description of the pipeline stages.
      Returns:
      the stage names joined by > delimiters
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • dataType

      public PipelineDescriptor.DataType dataType()
      Returns the value of the dataType record component.
      Returns:
      the value of the dataType record component
    • blockSize

      public int blockSize()
      Returns the value of the blockSize record component.
      Returns:
      the value of the blockSize record component
    • transforms

      public List<StageSpec.TransformSpec> transforms()
      Returns the value of the transforms record component.
      Returns:
      the value of the transforms record component
    • payload

      public StageSpec.PayloadSpec payload()
      Returns the value of the payload record component.
      Returns:
      the value of the payload record component