Class UInt4Vector.BufferedMutator

java.lang.Object
org.apache.drill.exec.vector.UInt4Vector.BufferedMutator
Enclosing class:
UInt4Vector

public static final class UInt4Vector.BufferedMutator extends Object
Helper class to buffer container mutation as a means to optimize native memory copy operations. NB: this class is automatically generated from ValueVectorTypes.tdd using FreeMarker.
  • Constructor Details

    • BufferedMutator

      public BufferedMutator(int startIdx, UInt4Vector parent)
    • BufferedMutator

      public BufferedMutator(int startIdx, int buffSz, UInt4Vector parent)
      Buffered mutator to optimize bulk access to the underlying vector container
      Parameters:
      startIdx - start idex of the first value to be copied
      buffSz - buffer length to us
      parent - parent container object
  • Method Details

    • setSafe

      public void setSafe(int value)
    • setSafe

      public void setSafe(int[] values, int numValues)
    • writeInt

      public static final void writeInt(int val, byte[] buffer, int pos)
    • getByteBuffer

      public ByteBuffer getByteBuffer()
      Returns:
      the backing byte buffer; this is useful when the caller can infer the values to write but wants to avoid having to use yet another intermediary byte array; caller is responsible for flushing the buffer
    • flush

      public void flush()