public class AllocationManager.BufferLedger extends Object implements ValueWithKeyIncluded<BaseAllocator>
| Modifier and Type | Method and Description |
|---|---|
int |
decrement(int decrement)
Decrement the ledger's reference count.
|
int |
getAccountedSize()
How much memory is accounted for by this ledger.
|
BaseAllocator |
getKey() |
AllocationManager.BufferLedger |
getLedgerForAllocator(BufferAllocator allocator)
Returns the ledger associated with a particular BufferAllocator.
|
int |
getSize()
What is the total size (in bytes) of memory underlying this ledger.
|
ArrowBuf |
newArrowBuf(int offset,
int length)
Create a new ArrowBuf associated with this AllocationManager and memory.
|
ArrowBuf |
newArrowBuf(int offset,
int length,
BufferManager manager)
Create a new ArrowBuf associated with this AllocationManager and memory.
|
void |
print(StringBuilder sb,
int indent,
BaseAllocator.Verbosity verbosity)
Print the current ledger state to a the provided StringBuilder.
|
boolean |
transferBalance(AllocationManager.BufferLedger target)
Transfer any balance the current ledger has to the target ledger.
|
public BaseAllocator getKey()
getKey in interface ValueWithKeyIncluded<BaseAllocator>public boolean transferBalance(AllocationManager.BufferLedger target)
target - The ledger to transfer ownership account to.public void print(StringBuilder sb, int indent, BaseAllocator.Verbosity verbosity)
sb - The StringBuilder to populate.indent - The level of indentation to position the data.verbosity - The level of verbosity to print.public int decrement(int decrement)
decrement - amout to decrease the reference count bypublic AllocationManager.BufferLedger getLedgerForAllocator(BufferAllocator allocator)
allocator - A BufferAllocator.public ArrowBuf newArrowBuf(int offset, int length)
offset - The offset in bytes to start this new ArrowBuf.length - The length in bytes that this ArrowBuf will provide access to.public ArrowBuf newArrowBuf(int offset, int length, BufferManager manager)
offset - The offset in bytes to start this new ArrowBuf.length - The length in bytes that this ArrowBuf will provide access to.manager - An optional BufferManager argument that can be used to manage expansion of
this ArrowBufpublic int getSize()
public int getAccountedSize()
Copyright © 2017 The Apache Software Foundation. All rights reserved.