Interface ExponentialHistogramBlock

All Superinterfaces:
org.apache.lucene.util.Accountable, AutoCloseable, Block, BlockLoader.Block, Closeable, org.elasticsearch.core.RefCounted, org.elasticsearch.core.Releasable, Writeable
All Known Implementing Classes:
ConstantNullBlock

public sealed interface ExponentialHistogramBlock extends Block permits ConstantNullBlock (not exhaustive)
A block that holds ExponentialHistogram values.
  • Method Details

    • getExponentialHistogram

      ExponentialHistogram getExponentialHistogram(int valueIndex, ExponentialHistogramScratch scratch)
      Returns the ExponentialHistogram value at the given index. In order to be allocation free, this method requires a scratch object to be passed in, whose memory will be used to hold the state of the returned histogram. Therefore, the return value of this method is only valid until either the block is closed or the same scratch instance is passed to another call to this method on any block.
      Parameters:
      valueIndex - the index of the histogram to get
      scratch - the scratch to use as storage for the returned histogram
      Returns:
      the exponential histogram at the given index
    • buildExponentialHistogramComponentBlock

      Block buildExponentialHistogramComponentBlock(ExponentialHistogramBlock.Component component)
      Returns a block holding the specified component of the exponential histogram at each position. The number of positions in the returned block will be exactly equal to the number of positions in this block. If a position is null in this block, it will also be null in the returned block.
      The caller is responsible for closing the returned block.
      Parameters:
      component - the component to extract
      Returns:
      the block containing the specified component
    • serializeExponentialHistogram

      void serializeExponentialHistogram(int valueIndex, ExponentialHistogramBlock.SerializedOutput out, org.apache.lucene.util.BytesRef scratch)
      Serializes the exponential histogram at the given index into the provided output, so that it can be read back via ExponentialHistogramBlockBuilder.deserializeAndAppend(SerializedInput).
      Parameters:
      valueIndex -
      out -
      scratch -
    • equals

      static boolean equals(ExponentialHistogramBlock blockA, ExponentialHistogramBlock blockB)