Top Fields Constructors Methods
io.netty5.buffer.pool

pack-priv final Class PoolSubpage

extends Object
implements PoolSubpageMetric
Class Inheritance
All Implemented Interfaces
io.netty5.buffer.pool.PoolSubpageMetric
Imports
java.util.concurrent.locks.ReentrantLock

Field Summary

Modifier and TypeField and Description
private final long[]
private int
pack-priv final PoolChunk
pack-priv boolean
pack-priv int
private final ReentrantLock
private int
pack-priv PoolSubpage
private int
private int
private final int
pack-priv PoolSubpage
private final int
private final int

Constructor Summary

AccessConstructor and Description
pack-priv
PoolSubpage()

Special constructor that creates a linked list head

pack-priv
PoolSubpage(PoolSubpage head, PoolChunk chunk, int pageShifts, int runOffset, int runSize, int elemSize)

Method Summary

Modifier and TypeMethod and Description
private void
pack-priv long
allocate()

Returns the bitmap index of the subpage allocation.

pack-priv void
public int
elementSize()

Implements io.netty5.buffer.pool.PoolSubpageMetric.elementSize.

Return the size (in bytes) of the elements that will be allocated.
private int
private int
findNextAvail0(int i, long bits)

pack-priv boolean

Returns:

true if this subpage is in use. false if this subpage is not used by its chunk and thus it's OK to be released.
free
(PoolSubpage head, int bitmapIdx)

private int
pack-priv void
lock()

public int
maxNumElements()

Implements io.netty5.buffer.pool.PoolSubpageMetric.maxNumElements.

Return the number of maximal elements that can be allocated out of the sub-page.
public int
numAvailable()

Implements io.netty5.buffer.pool.PoolSubpageMetric.numAvailable.

Return the number of available elements to be allocated.
public int
pageSize()

Implements io.netty5.buffer.pool.PoolSubpageMetric.pageSize.

Return the page size (in bytes) of this page.
private void
private void
setNextAvail(int bitmapIdx)

private long
toHandle(int bitmapIdx)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

bitmapback to summary
private final long[] bitmap
bitmapLengthback to summary
private int bitmapLength
chunkback to summary
pack-priv final PoolChunk chunk
doNotDestroyback to summary
pack-priv boolean doNotDestroy
elemSizeback to summary
pack-priv int elemSize
lockback to summary
private final ReentrantLock lock
maxNumElemsback to summary
private int maxNumElems
nextback to summary
pack-priv PoolSubpage next
nextAvailback to summary
private int nextAvail
numAvailback to summary
private int numAvail
pageShiftsback to summary
private final int pageShifts
prevback to summary
pack-priv PoolSubpage prev
runOffsetback to summary
private final int runOffset
runSizeback to summary
private final int runSize

Constructor Detail

PoolSubpageback to summary
pack-priv PoolSubpage()

Special constructor that creates a linked list head

PoolSubpageback to summary
pack-priv PoolSubpage(PoolSubpage head, PoolChunk chunk, int pageShifts, int runOffset, int runSize, int elemSize)

Method Detail

addToPoolback to summary
private void addToPool(PoolSubpage head)
allocateback to summary
pack-priv long allocate()

Returns the bitmap index of the subpage allocation.

destroyback to summary
pack-priv void destroy()
elementSizeback to summary
public int elementSize()

Implements io.netty5.buffer.pool.PoolSubpageMetric.elementSize.

Doc from io.netty5.buffer.pool.PoolSubpageMetric.elementSize.

Return the size (in bytes) of the elements that will be allocated.

Annotations
@Override
findNextAvailback to summary
private int findNextAvail()
findNextAvail0back to summary
private int findNextAvail0(int i, long bits)
freeback to summary
pack-priv boolean free(PoolSubpage head, int bitmapIdx)
Returns:boolean

true if this subpage is in use. false if this subpage is not used by its chunk and thus it's OK to be released.

getNextAvailback to summary
private int getNextAvail()
lockback to summary
pack-priv void lock()
maxNumElementsback to summary
public int maxNumElements()

Implements io.netty5.buffer.pool.PoolSubpageMetric.maxNumElements.

Doc from io.netty5.buffer.pool.PoolSubpageMetric.maxNumElements.

Return the number of maximal elements that can be allocated out of the sub-page.

Annotations
@Override
numAvailableback to summary
public int numAvailable()

Implements io.netty5.buffer.pool.PoolSubpageMetric.numAvailable.

Doc from io.netty5.buffer.pool.PoolSubpageMetric.numAvailable.

Return the number of available elements to be allocated.

Annotations
@Override
pageSizeback to summary
public int pageSize()

Implements io.netty5.buffer.pool.PoolSubpageMetric.pageSize.

Doc from io.netty5.buffer.pool.PoolSubpageMetric.pageSize.

Return the page size (in bytes) of this page.

Annotations
@Override
removeFromPoolback to summary
private void removeFromPool()
setNextAvailback to summary
private void setNextAvail(int bitmapIdx)
toHandleback to summary
private long toHandle(int bitmapIdx)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
unlockback to summary
pack-priv void unlock()