Package io.netty.buffer
Class AdaptivePoolingAllocator.MagazineGroup
- java.lang.Object
-
- io.netty.buffer.AdaptivePoolingAllocator.MagazineGroup
-
- Enclosing class:
- AdaptivePoolingAllocator
private static final class AdaptivePoolingAllocator.MagazineGroup extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private AdaptivePoolingAllocatorallocatorprivate AdaptivePoolingAllocator.ChunkAllocatorchunkAllocatorprivate AdaptivePoolingAllocator.ChunkCachechunkCacheprivate AdaptivePoolingAllocator.ChunkManagementStrategychunkManagementStrategyprivate booleanfreedprivate java.util.concurrent.locks.StampedLockmagazineExpandLockprivate AdaptivePoolingAllocator.Magazine[]magazinesprivate java.lang.ThreadownerThreadprivate AdaptivePoolingAllocator.MagazinethreadLocalMagazine
-
Constructor Summary
Constructors Constructor Description MagazineGroup(AdaptivePoolingAllocator allocator, AdaptivePoolingAllocator.ChunkAllocator chunkAllocator, AdaptivePoolingAllocator.ChunkManagementStrategy chunkManagementStrategy, boolean isThreadLocal)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AdaptivePoolingAllocator.AdaptiveByteBufallocate(int size, int maxCapacity, java.lang.Thread currentThread, AdaptivePoolingAllocator.AdaptiveByteBuf buf)private voidfree()private voidfreeChunkReuseQueue(java.lang.Thread ownerThread)(package private) booleanofferChunk(AdaptivePoolingAllocator.Chunk chunk)(package private) AdaptivePoolingAllocator.ChunkpollChunk(int size)private booleantryExpandMagazines(int currentLength)
-
-
-
Field Detail
-
allocator
private final AdaptivePoolingAllocator allocator
-
chunkAllocator
private final AdaptivePoolingAllocator.ChunkAllocator chunkAllocator
-
chunkManagementStrategy
private final AdaptivePoolingAllocator.ChunkManagementStrategy chunkManagementStrategy
-
chunkCache
private final AdaptivePoolingAllocator.ChunkCache chunkCache
-
magazineExpandLock
private final java.util.concurrent.locks.StampedLock magazineExpandLock
-
threadLocalMagazine
private final AdaptivePoolingAllocator.Magazine threadLocalMagazine
-
ownerThread
private java.lang.Thread ownerThread
-
magazines
private volatile AdaptivePoolingAllocator.Magazine[] magazines
-
freed
private volatile boolean freed
-
-
Constructor Detail
-
MagazineGroup
MagazineGroup(AdaptivePoolingAllocator allocator, AdaptivePoolingAllocator.ChunkAllocator chunkAllocator, AdaptivePoolingAllocator.ChunkManagementStrategy chunkManagementStrategy, boolean isThreadLocal)
-
-
Method Detail
-
allocate
public AdaptivePoolingAllocator.AdaptiveByteBuf allocate(int size, int maxCapacity, java.lang.Thread currentThread, AdaptivePoolingAllocator.AdaptiveByteBuf buf)
-
tryExpandMagazines
private boolean tryExpandMagazines(int currentLength)
-
pollChunk
AdaptivePoolingAllocator.Chunk pollChunk(int size)
-
offerChunk
boolean offerChunk(AdaptivePoolingAllocator.Chunk chunk)
-
free
private void free()
-
freeChunkReuseQueue
private void freeChunkReuseQueue(java.lang.Thread ownerThread)
-
-