public abstract class PoolAllocator<P extends Pool> extends AbstractAllocator
Modifier and Type | Method and Description |
---|---|
abstract java.nio.ByteBuffer |
allocate(int size,
OpOrder.Group opGroup) |
java.nio.ByteBuffer |
clone(java.nio.ByteBuffer buffer,
OpOrder.Group opGroup)
Allocate a slice of the given length.
|
abstract void |
free(java.nio.ByteBuffer name)
Mark the BB as unused, permitting it to be reclaimed
|
boolean |
isLive() |
protected void |
markAllocated(int size,
OpOrder.Group opGroup) |
float |
ownershipRatio() |
long |
owns() |
long |
reclaiming() |
void |
setDiscarded()
Indicate the memory and resources owned by this allocator are no longer referenced,
and can be reclaimed/reused.
|
void |
setDiscarding()
Mark this allocator as reclaiming; this will mark the memory it owns as reclaiming, so remove it from
any calculation deciding if further cleaning/reclamation is necessary.
|
ContextAllocator |
wrap(OpOrder.Group opGroup,
ColumnFamilyStore cfs) |
allocate, clone
public void setDiscarding()
public void setDiscarded()
public abstract java.nio.ByteBuffer allocate(int size, OpOrder.Group opGroup)
public abstract void free(java.nio.ByteBuffer name)
protected void markAllocated(int size, OpOrder.Group opGroup)
public boolean isLive()
public java.nio.ByteBuffer clone(java.nio.ByteBuffer buffer, OpOrder.Group opGroup)
public ContextAllocator wrap(OpOrder.Group opGroup, ColumnFamilyStore cfs)
public long owns()
owns
in class AbstractAllocator
public float ownershipRatio()
ownershipRatio
in class AbstractAllocator
public long reclaiming()
reclaiming
in class AbstractAllocator
Copyright © 2014 The Apache Software Foundation