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.ChunkCacheprivate final AdaptivePoolingAllocator.ChunkManagementStrategyprivate booleanprivate final StampedLockprivate AdaptivePoolingAllocator.Magazine[]private Threadprivate final AdaptivePoolingAllocator.Magazine -
Constructor Summary
ConstructorsConstructorDescriptionMagazineGroup(AdaptivePoolingAllocator allocator, AdaptivePoolingAllocator.ChunkAllocator chunkAllocator, AdaptivePoolingAllocator.ChunkManagementStrategy chunkManagementStrategy, boolean isThreadLocal) -
Method Summary
Modifier and TypeMethodDescriptionallocate(int size, int maxCapacity, Thread currentThread, AdaptivePoolingAllocator.AdaptiveByteBuf buf) private voidfree()private voidfreeChunkReuseQueue(Thread ownerThread) (package private) boolean(package private) AdaptivePoolingAllocator.ChunkpollChunk(int size) private booleantryExpandMagazines(int currentLength)
-
Field Details
-
allocator
-
chunkAllocator
-
chunkManagementStrategy
-
chunkCache
-
magazineExpandLock
-
threadLocalMagazine
-
ownerThread
-
magazines
-
freed
private volatile boolean freed
-
-
Constructor Details
-
MagazineGroup
MagazineGroup(AdaptivePoolingAllocator allocator, AdaptivePoolingAllocator.ChunkAllocator chunkAllocator, AdaptivePoolingAllocator.ChunkManagementStrategy chunkManagementStrategy, boolean isThreadLocal)
-
-
Method Details
-
allocate
public AdaptivePoolingAllocator.AdaptiveByteBuf allocate(int size, int maxCapacity, Thread currentThread, AdaptivePoolingAllocator.AdaptiveByteBuf buf) -
tryExpandMagazines
private boolean tryExpandMagazines(int currentLength) -
pollChunk
-
offerChunk
-
free
private void free() -
freeChunkReuseQueue
-