public abstract class BaseValueVector extends Object implements ValueVector
Modifier and Type | Field and Description |
---|---|
protected BufferAllocator |
allocator |
static int |
INITIAL_VALUE_ALLOCATION |
static long |
MAX_ALLOCATION_SIZE |
static String |
MAX_ALLOCATION_SIZE_PROPERTY |
Modifier | Constructor and Description |
---|---|
protected |
BaseValueVector(BufferAllocator allocator) |
Modifier and Type | Method and Description |
---|---|
static boolean |
checkBufRefs(ValueVector vv)
Checks to ensure that every buffer
vv uses
has a positive reference count, throws if this precondition
isn't met. |
void |
clear()
Release any owned ArrowBuf and reset the ValueVector to the initial state.
|
void |
close()
Alternative to clear().
|
void |
copyFrom(int fromIndex,
int thisIndex,
ValueVector from)
Copy a cell value from a particular index in source vector to a particular
position in this vector.
|
void |
copyFromSafe(int fromIndex,
int thisIndex,
ValueVector from)
Same as
ValueVector.copyFrom(int, int, ValueVector) except that
it handles the case when the capacity of the vector needs to be expanded
before copy. |
BufferAllocator |
getAllocator() |
abstract String |
getName()
Gets the name of the vector.
|
TransferPair |
getTransferPair(BufferAllocator allocator)
To transfer quota responsibility.
|
protected static int |
getValidityBufferSizeFromCount(int valueCount) |
Iterator<ValueVector> |
iterator() |
protected ArrowBuf |
releaseBuffer(ArrowBuf buffer) |
String |
toString()
Representation of vector suitable for debugging.
|
static ArrowBuf |
transferBuffer(ArrowBuf srcBuffer,
BufferAllocator targetAllocator) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
accept, allocateNew, allocateNewSafe, getBuffers, getBufferSize, getBufferSizeFor, getDataBuffer, getField, getMinorType, getNullCount, getObject, getOffsetBuffer, getReader, getTransferPair, getTransferPair, getValidityBuffer, getValueCapacity, getValueCount, hashCode, hashCode, isNull, makeTransferPair, reAlloc, reset, setInitialCapacity, setValueCount
forEach, spliterator
public static final String MAX_ALLOCATION_SIZE_PROPERTY
public static final long MAX_ALLOCATION_SIZE
public static final int INITIAL_VALUE_ALLOCATION
protected final BufferAllocator allocator
protected BaseValueVector(BufferAllocator allocator)
public abstract String getName()
ValueVector
getName
in interface ValueVector
public String toString()
public void clear()
ValueVector
clear
in interface ValueVector
public void close()
ValueVector
close
in interface Closeable
close
in interface AutoCloseable
close
in interface ValueVector
public TransferPair getTransferPair(BufferAllocator allocator)
ValueVector
getTransferPair
in interface ValueVector
allocator
- the target allocatortransfer pair
, creating a new target vector of
the same type.public Iterator<ValueVector> iterator()
iterator
in interface Iterable<ValueVector>
public static boolean checkBufRefs(ValueVector vv)
vv
uses
has a positive reference count, throws if this precondition
isn't met. Returns true otherwise.public BufferAllocator getAllocator()
getAllocator
in interface ValueVector
protected static int getValidityBufferSizeFromCount(int valueCount)
public static ArrowBuf transferBuffer(ArrowBuf srcBuffer, BufferAllocator targetAllocator)
public void copyFrom(int fromIndex, int thisIndex, ValueVector from)
ValueVector
copyFrom
in interface ValueVector
fromIndex
- position to copy from in source vectorthisIndex
- position to copy to in this vectorfrom
- source vectorpublic void copyFromSafe(int fromIndex, int thisIndex, ValueVector from)
ValueVector
ValueVector.copyFrom(int, int, ValueVector)
except that
it handles the case when the capacity of the vector needs to be expanded
before copy.copyFromSafe
in interface ValueVector
fromIndex
- position to copy from in source vectorthisIndex
- position to copy to in this vectorfrom
- source vectorCopyright © 2020 The Apache Software Foundation. All rights reserved.