Class AdaptivePoolingAllocator.MagazineGroup
java.lang.Object
io.netty.buffer.AdaptivePoolingAllocator.MagazineGroup
- Enclosing class:
AdaptivePoolingAllocator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AdaptivePoolingAllocatorprivate final AdaptivePoolingAllocator.ChunkAllocatorprivate final AdaptivePoolingAllocator.ChunkControllerFactoryprivate final Queue<AdaptivePoolingAllocator.Chunk> private booleanprivate final StampedLockprivate AdaptivePoolingAllocator.Magazine[]private final AdaptivePoolingAllocator.Magazine -
Constructor Summary
ConstructorsConstructorDescriptionMagazineGroup(AdaptivePoolingAllocator allocator, AdaptivePoolingAllocator.ChunkAllocator chunkAllocator, AdaptivePoolingAllocator.ChunkControllerFactory chunkControllerFactory, boolean isThreadLocal) -
Method Summary
Modifier and TypeMethodDescriptionallocate(int size, int maxCapacity, Thread currentThread, AdaptivePoolingAllocator.AdaptiveByteBuf buf) private voidfree()private void(package private) booleanprivate booleantryExpandMagazines(int currentLength)
-
Field Details
-
allocator
-
chunkAllocator
-
chunkControllerFactory
-
chunkReuseQueue
-
magazineExpandLock
-
threadLocalMagazine
-
magazines
-
freed
private volatile boolean freed
-
-
Constructor Details
-
MagazineGroup
MagazineGroup(AdaptivePoolingAllocator allocator, AdaptivePoolingAllocator.ChunkAllocator chunkAllocator, AdaptivePoolingAllocator.ChunkControllerFactory chunkControllerFactory, boolean isThreadLocal)
-
-
Method Details
-
allocate
public AdaptivePoolingAllocator.AdaptiveByteBuf allocate(int size, int maxCapacity, Thread currentThread, AdaptivePoolingAllocator.AdaptiveByteBuf buf) -
tryExpandMagazines
private boolean tryExpandMagazines(int currentLength) -
offerToQueue
-
free
private void free() -
freeChunkReuseQueue
private void freeChunkReuseQueue()
-