Package io.netty.buffer
Class PoolArena.DirectArena
- java.lang.Object
-
- io.netty.buffer.SizeClasses
-
- io.netty.buffer.PoolArena<java.nio.ByteBuffer>
-
- io.netty.buffer.PoolArena.DirectArena
-
- All Implemented Interfaces:
PoolArenaMetric
,SizeClassesMetric
static final class PoolArena.DirectArena extends PoolArena<java.nio.ByteBuffer>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.netty.buffer.PoolArena
PoolArena.DirectArena, PoolArena.HeapArena, PoolArena.SizeClass
-
-
Field Summary
-
Fields inherited from class io.netty.buffer.PoolArena
directMemoryCacheAlignment, numSmallSubpagePools, numThreadCaches, parent, smallSubpagePools
-
Fields inherited from class io.netty.buffer.SizeClasses
chunkSize, LOG2_QUANTUM, lookupMaxSize, nPSizes, nSizes, nSubpages, pageShifts, pageSize, smallMaxSizeIdx
-
-
Constructor Summary
Constructors Constructor Description DirectArena(PooledByteBufAllocator parent, int pageSize, int pageShifts, int chunkSize, int directMemoryCacheAlignment)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.nio.ByteBuffer
allocateDirect(int capacity)
protected void
destroyChunk(PoolChunk<java.nio.ByteBuffer> chunk)
(package private) boolean
isDirect()
protected void
memoryCopy(java.nio.ByteBuffer src, int srcOffset, PooledByteBuf<java.nio.ByteBuffer> dstBuf, int length)
protected PooledByteBuf<java.nio.ByteBuffer>
newByteBuf(int maxCapacity)
protected PoolChunk<java.nio.ByteBuffer>
newChunk(int pageSize, int maxPageIdx, int pageShifts, int chunkSize)
protected PoolChunk<java.nio.ByteBuffer>
newUnpooledChunk(int capacity)
-
Methods inherited from class io.netty.buffer.PoolArena
allocate, chunkLists, finalize, free, freeChunk, lock, numActiveAllocations, numActiveBytes, numActiveHugeAllocations, numActiveNormalAllocations, numActiveSmallAllocations, numActiveTinyAllocations, numAllocations, numChunkLists, numDeallocations, numHugeAllocations, numHugeDeallocations, numNormalAllocations, numNormalDeallocations, numPinnedBytes, numSmallAllocations, numSmallDeallocations, numSmallSubpages, numThreadCaches, numTinyAllocations, numTinyDeallocations, numTinySubpages, reallocate, smallSubpages, tinySubpages, toString, unlock
-
Methods inherited from class io.netty.buffer.SizeClasses
normalizeSize, pageIdx2size, pageIdx2sizeCompute, pages2pageIdx, pages2pageIdxFloor, size2SizeIdx, sizeIdx2size, sizeIdx2sizeCompute
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.netty.buffer.SizeClassesMetric
normalizeSize, pageIdx2size, pageIdx2sizeCompute, pages2pageIdx, pages2pageIdxFloor, size2SizeIdx, sizeIdx2size, sizeIdx2sizeCompute
-
-
-
-
Constructor Detail
-
DirectArena
DirectArena(PooledByteBufAllocator parent, int pageSize, int pageShifts, int chunkSize, int directMemoryCacheAlignment)
-
-
Method Detail
-
newChunk
protected PoolChunk<java.nio.ByteBuffer> newChunk(int pageSize, int maxPageIdx, int pageShifts, int chunkSize)
-
newUnpooledChunk
protected PoolChunk<java.nio.ByteBuffer> newUnpooledChunk(int capacity)
- Specified by:
newUnpooledChunk
in classPoolArena<java.nio.ByteBuffer>
-
allocateDirect
private static java.nio.ByteBuffer allocateDirect(int capacity)
-
destroyChunk
protected void destroyChunk(PoolChunk<java.nio.ByteBuffer> chunk)
- Specified by:
destroyChunk
in classPoolArena<java.nio.ByteBuffer>
-
newByteBuf
protected PooledByteBuf<java.nio.ByteBuffer> newByteBuf(int maxCapacity)
- Specified by:
newByteBuf
in classPoolArena<java.nio.ByteBuffer>
-
memoryCopy
protected void memoryCopy(java.nio.ByteBuffer src, int srcOffset, PooledByteBuf<java.nio.ByteBuffer> dstBuf, int length)
- Specified by:
memoryCopy
in classPoolArena<java.nio.ByteBuffer>
-
-