Package io.netty.buffer
Class AdaptivePoolingAllocator.SizeClassChunkController
- java.lang.Object
-
- io.netty.buffer.AdaptivePoolingAllocator.SizeClassChunkController
-
- All Implemented Interfaces:
AdaptivePoolingAllocator.ChunkController
- Enclosing class:
- AdaptivePoolingAllocator
private static final class AdaptivePoolingAllocator.SizeClassChunkController extends java.lang.Object implements AdaptivePoolingAllocator.ChunkController
-
-
Field Summary
Fields Modifier and Type Field Description private AdaptivePoolingAllocator.ChunkAllocatorchunkAllocatorprivate AdaptivePoolingAllocator.ChunkRegistrychunkRegistryprivate intchunkSizeprivate intsegmentSize
-
Constructor Summary
Constructors Modifier Constructor Description privateSizeClassChunkController(AdaptivePoolingAllocator.MagazineGroup group, int segmentSize, int chunkSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcomputeBufferCapacity(int requestedSize, int maxCapacity, boolean isReallocation)Compute the "fast max capacity" value for the buffer.private MpscIntQueuecreateEmptyFreeList()private MpscIntQueuecreateFreeList()private AdaptivePoolingAllocator.IntStackcreateLocalFreeList()AdaptivePoolingAllocator.ChunknewChunkAllocation(int promptingSize, AdaptivePoolingAllocator.Magazine magazine)Allocate a newAdaptivePoolingAllocator.Chunkfor the givenAdaptivePoolingAllocator.Magazine.
-
-
-
Field Detail
-
chunkAllocator
private final AdaptivePoolingAllocator.ChunkAllocator chunkAllocator
-
segmentSize
private final int segmentSize
-
chunkSize
private final int chunkSize
-
chunkRegistry
private final AdaptivePoolingAllocator.ChunkRegistry chunkRegistry
-
-
Constructor Detail
-
SizeClassChunkController
private SizeClassChunkController(AdaptivePoolingAllocator.MagazineGroup group, int segmentSize, int chunkSize)
-
-
Method Detail
-
createEmptyFreeList
private MpscIntQueue createEmptyFreeList()
-
createFreeList
private MpscIntQueue createFreeList()
-
createLocalFreeList
private AdaptivePoolingAllocator.IntStack createLocalFreeList()
-
computeBufferCapacity
public int computeBufferCapacity(int requestedSize, int maxCapacity, boolean isReallocation)Description copied from interface:AdaptivePoolingAllocator.ChunkControllerCompute the "fast max capacity" value for the buffer.- Specified by:
computeBufferCapacityin interfaceAdaptivePoolingAllocator.ChunkController
-
newChunkAllocation
public AdaptivePoolingAllocator.Chunk newChunkAllocation(int promptingSize, AdaptivePoolingAllocator.Magazine magazine)
Description copied from interface:AdaptivePoolingAllocator.ChunkControllerAllocate a newAdaptivePoolingAllocator.Chunkfor the givenAdaptivePoolingAllocator.Magazine.- Specified by:
newChunkAllocationin interfaceAdaptivePoolingAllocator.ChunkController
-
-