Class AbstractVectorBuilder

java.lang.Object
org.elasticsearch.compute.data.AbstractVectorBuilder
All Implemented Interfaces:
Closeable, AutoCloseable, Vector.Builder, org.elasticsearch.core.Releasable

public abstract class AbstractVectorBuilder extends Object implements Vector.Builder
  • Field Details

    • valueCount

      protected int valueCount
    • blockFactory

      protected final BlockFactory blockFactory
    • estimatedBytes

      protected long estimatedBytes
      The number of bytes currently estimated with the breaker.
  • Constructor Details

    • AbstractVectorBuilder

      protected AbstractVectorBuilder(BlockFactory blockFactory)
  • Method Details

    • valuesLength

      protected abstract int valuesLength()
      The length of the internal values array.
    • growValuesArray

      protected abstract void growValuesArray(int newSize)
    • elementSize

      protected abstract int elementSize()
      The number of bytes used to represent each value element.
    • ensureCapacity

      protected final void ensureCapacity()
    • adjustBreaker

      protected void adjustBreaker(long deltaBytes)
    • finish

      protected final void finish()
      Called during implementations of Block.Builder.build() as a first step to check if the block is still open and to finish the last position.
    • estimatedBytes

      public long estimatedBytes()
      Description copied from interface: Vector.Builder
      An estimate of the number of bytes the Vector created by Vector.Builder.build() will use. This may overestimate the size but shouldn't underestimate it.
      Specified by:
      estimatedBytes in interface Vector.Builder
    • built

      protected final void built()
      Called during implementations of Block.Builder.build() as a last step to mark the Builder as closed and make sure that further closes don't double free memory.
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.elasticsearch.core.Releasable
    • extraClose

      protected void extraClose()
      Called when first closed.
    • isReleased

      public boolean isReleased()