public class AllocationManager.BufferLedger extends Object
| Modifier and Type | Method and Description |
|---|---|
int |
decrement(int decrement)
Decrement the ledger's reference count.
|
int |
getAccountedSize()
Amount of memory accounted for by this ledger.
|
AllocationManager.BufferLedger |
getLedgerForAllocator(BufferAllocator allocator)
Returns the ledger associated with a particular BufferAllocator.
|
int |
getSize()
The total size (in bytes) of memory underlying this ledger.
|
protected UnsafeDirectLittleEndian |
getUnderlying()
Package visible for debugging/verification only.
|
protected boolean |
isOwningLedger()
Package visible for debugging/verification only.
|
DrillBuf |
newDrillBuf(int offset,
int length)
Create a new DrillBuf associated with this AllocationManager and memory.
|
DrillBuf |
newDrillBuf(int offset,
int length,
BufferManager manager)
Create a new DrillBuf 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 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)
public AllocationManager.BufferLedger getLedgerForAllocator(BufferAllocator allocator)
allocator - public DrillBuf newDrillBuf(int offset, int length)
offset - The offset in bytes to start this new DrillBuf.length - The length in bytes that this DrillBuf will provide access to.public DrillBuf newDrillBuf(int offset, int length, BufferManager manager)
offset - The offset in bytes to start this new DrillBuf.length - The length in bytes that this DrillBuf will provide access to.manager - An optional BufferManager argument that can be used to manage expansion of this DrillBuf.public int getSize()
public int getAccountedSize()
protected UnsafeDirectLittleEndian getUnderlying()
protected boolean isOwningLedger()
Copyright © 2021 The Apache Software Foundation. All rights reserved.