public interface ReferenceManager
| Modifier and Type | Field and Description |
|---|---|
static ReferenceManager |
NO_OP |
static String |
NO_OP_ERROR_MESSAGE |
| Modifier and Type | Method and Description |
|---|---|
ArrowBuf |
deriveBuffer(ArrowBuf sourceBuffer,
int index,
int length)
Derive a new ArrowBuf from a given source ArrowBuf.
|
int |
getAccountedSize()
Get the total accounted size (in bytes).
|
BufferAllocator |
getAllocator()
Get the buffer allocator associated with this reference manager
|
int |
getRefCount()
Return the reference count.
|
int |
getSize()
Total size (in bytes) of memory underlying this reference manager.
|
boolean |
release()
Decrement this reference manager's reference count by 1 for the associated underlying
memory.
|
boolean |
release(int decrement)
Decrement this reference manager's reference count for the associated underlying
memory.
|
void |
retain()
Increment this reference manager's reference count by 1 for the associated underlying
memory.
|
ArrowBuf |
retain(ArrowBuf srcBuffer,
BufferAllocator targetAllocator)
Create a new ArrowBuf that is associated with an alternative allocator for the purposes of
memory ownership and accounting.
|
void |
retain(int increment)
Increment this reference manager's reference count by a given amount for the
associated underlying memory.
|
OwnershipTransferResult |
transferOwnership(ArrowBuf sourceBuffer,
BufferAllocator targetAllocator)
Transfer the memory accounting ownership of this ArrowBuf to another allocator.
|
static final String NO_OP_ERROR_MESSAGE
static final ReferenceManager NO_OP
int getRefCount()
boolean release()
boolean release(int decrement)
decrement - the count to decrease the reference count byvoid retain()
void retain(int increment)
increment - the count to increase the reference count byArrowBuf retain(ArrowBuf srcBuffer, BufferAllocator targetAllocator)
srcBuffer - source ArrowBuftargetAllocator - The target allocator to create an association with.ArrowBuf deriveBuffer(ArrowBuf sourceBuffer, int index, int length)
sourceBuffer - source ArrowBufindex - index (relative to source ArrowBuf) new ArrowBuf should be derived fromlength - length (bytes) of data in underlying memory that derived buffer will
have access to in underlying memoryOwnershipTransferResult transferOwnership(ArrowBuf sourceBuffer, BufferAllocator targetAllocator)
sourceBuffer - source ArrowBuftargetAllocator - The target allocator to create an association withOwnershipTransferResult with info on transfer result and new bufferBufferAllocator getAllocator()
int getSize()
int getAccountedSize()
Copyright © 2019 The Apache Software Foundation. All rights reserved.