| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private final int | |
| public static final PooledByteBufAllocator | |
| private static final int | |
| private static final long | |
| private static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final boolean | |
| private final List | |
| private final PoolArena | |
| private final List | |
| private final PoolArena | |
| private static final InternalLogger | |
| private static final int | |
| private final PooledByteBufAllocatorMetric | |
| private static final int | |
| private final int | |
| private final int | |
| private final PooledByteBufAllocator. | |
| private final Runnable |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | PooledByteBufAllocator(boolean preferDirect, int nHeapArena, int nDirectArena, int pageSize, int maxOrder)
|
| public | PooledByteBufAllocator(boolean preferDirect, int nHeapArena, int nDirectArena, int pageSize, int maxOrder, int tinyCacheSize, int smallCacheSize, int normalCacheSize)
|
| public | PooledByteBufAllocator(boolean preferDirect, int nHeapArena, int nDirectArena, int pageSize, int maxOrder, int tinyCacheSize, int smallCacheSize, int normalCacheSize, boolean useCacheForAllThreads)
|
| public | PooledByteBufAllocator(boolean preferDirect, int nHeapArena, int nDirectArena, int pageSize, int maxOrder, int smallCacheSize, int normalCacheSize, boolean useCacheForAllThreads)
|
| public | PooledByteBufAllocator(boolean preferDirect, int nHeapArena, int nDirectArena, int pageSize, int maxOrder, int tinyCacheSize, int smallCacheSize, int normalCacheSize, boolean useCacheForAllThreads, int directMemoryCacheAlignment)
|
| public | PooledByteBufAllocator(boolean preferDirect, int nHeapArena, int nDirectArena, int pageSize, int maxOrder, int smallCacheSize, int normalCacheSize, boolean useCacheForAllThreads, int directMemoryCacheAlignment)
|
| Modifier and Type | Method and Description |
|---|---|
| public final int | chunkSize()
Deprecated
use
Return the chunk size for an arena.
PooledByteBufAllocatorMetric#chunkSize().
|
| public static int | |
| public static int | defaultNormalCacheSize()
Default normal cache size - System Property: io.netty.allocator.normalCacheSize - default 64 |
| public static int | defaultNumDirectArena()
Default number of direct arenas - System Property: io.netty.allocator.numDirectArenas - default 2 * cores |
| public static int | defaultNumHeapArena()
Default number of heap arenas - System Property: io.netty.allocator.numHeapArenas - default 2 * cores |
| public static int | defaultPageSize()
Default buffer page size - System Property: io.netty.allocator.pageSize - default 8192 |
| public static boolean | defaultPreferDirect()
Default prefer direct - System Property: io.netty.noPreferDirect - default false |
| public static int | defaultSmallCacheSize()
Default small cache size - System Property: io.netty.allocator.smallCacheSize - default 256 |
| public static int | defaultTinyCacheSize()
Deprecated
Tiny caches have been merged into small caches.
Default tiny cache size - default 0
|
| public static boolean | defaultUseCacheForAllThreads()
Default thread caching behavior - System Property: io.netty.allocator.useCacheForAllThreads - default false |
| public List | directArenas()
Deprecated
use
Return a PooledByteBufAllocatorMetric#directArenas().
List of all direct PoolArenaMetrics that are provided by this pool.
|
| public String | |
| public void | |
| public boolean | hasThreadLocalCache()
Deprecated
will be removed
Returns
true if the calling Thread has a ThreadLocal cache for the allocated
buffers.
|
| public List | heapArenas()
Deprecated
use
Return a PooledByteBufAllocatorMetric#heapArenas().
List of all heap PoolArenaMetrics that are provided by this pool.
|
| public boolean | isDirectBufferPooled()
Implements io. true if direct ByteBuf's are pooled
|
| public static boolean | isDirectMemoryCacheAlignmentSupported()
Return |
| public PooledByteBufAllocatorMetric | metric()
Implements io. ByteBufAllocatorMetric for a ByteBufAllocator.
|
| private static <T> PoolArena | |
| protected ByteBuf | newDirectBuffer(int initialCapacity, int maxCapacity)
Implements abstract io. ByteBuf with the given initialCapacity and maxCapacity.
|
| protected ByteBuf | newHeapBuffer(int initialCapacity, int maxCapacity)
Implements abstract io. ByteBuf with the given initialCapacity and maxCapacity.
|
| public int | normalCacheSize()
Deprecated
use
Return the size of the normal cache.
PooledByteBufAllocatorMetric#normalCacheSize().
|
| public int | numDirectArenas()
Deprecated
use
Return the number of direct arenas.
PooledByteBufAllocatorMetric#numDirectArenas().
|
| public int | numHeapArenas()
Deprecated
use
Return the number of heap arenas.
PooledByteBufAllocatorMetric#numHeapArenas().
|
| public int | numThreadLocalCaches()
Deprecated
use
Return the number of thread local caches used by this PooledByteBufAllocatorMetric#numThreadLocalCaches().
PooledByteBufAllocator.
|
| public final long | pinnedDirectMemory()
Returns the number of bytes of direct memory that is currently pinned to direct buffers allocated by a
|
| public final long | pinnedHeapMemory()
Returns the number of bytes of heap memory that is currently pinned to heap buffers allocated by a
|
| private static long | |
| public int | smallCacheSize()
Deprecated
use
Return the size of the small cache.
PooledByteBufAllocatorMetric#smallCacheSize().
|
| pack-priv final PoolThreadCache | |
| public int | tinyCacheSize()
Deprecated
use
Return the size of the tiny cache.
PooledByteBufAllocatorMetric#tinyCacheSize().
|
| public boolean | trimCurrentThreadCache()
Trim thread local cache for the current |
| pack-priv final long | |
| pack-priv final long | |
| private static long | |
| private static int | |
| private static int |
| CACHE_NOT_USED | back to summary |
|---|---|
| private static final int CACHE_NOT_USED | |
| chunkSize | back to summary |
|---|---|
| private final int chunkSize | |
| DEFAULT | back to summary |
|---|---|
| public static final PooledByteBufAllocator DEFAULT | |
| DEFAULT_CACHE_TRIM_INTERVAL | back to summary |
|---|---|
| private static final int DEFAULT_CACHE_TRIM_INTERVAL | |
| DEFAULT_CACHE_TRIM_INTERVAL_MILLIS | back to summary |
|---|---|
| private static final long DEFAULT_CACHE_TRIM_INTERVAL_MILLIS | |
| DEFAULT_DIRECT_MEMORY_CACHE_ALIGNMENT | back to summary |
|---|---|
| private static final int DEFAULT_DIRECT_MEMORY_CACHE_ALIGNMENT | |
| DEFAULT_MAX_CACHED_BUFFER_CAPACITY | back to summary |
|---|---|
| pack-priv static final int DEFAULT_MAX_CACHED_BUFFER_CAPACITY | |
| DEFAULT_MAX_CACHED_BYTEBUFFERS_PER_CHUNK | back to summary |
|---|---|
| pack-priv static final int DEFAULT_MAX_CACHED_BYTEBUFFERS_PER_CHUNK | |
| DEFAULT_MAX_ORDER | back to summary |
|---|---|
| private static final int DEFAULT_MAX_ORDER | |
| DEFAULT_NORMAL_CACHE_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_NORMAL_CACHE_SIZE | |
| DEFAULT_NUM_DIRECT_ARENA | back to summary |
|---|---|
| private static final int DEFAULT_NUM_DIRECT_ARENA | |
| DEFAULT_NUM_HEAP_ARENA | back to summary |
|---|---|
| private static final int DEFAULT_NUM_HEAP_ARENA | |
| DEFAULT_PAGE_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_PAGE_SIZE | |
| DEFAULT_SMALL_CACHE_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_SMALL_CACHE_SIZE | |
| DEFAULT_USE_CACHE_FOR_ALL_THREADS | back to summary |
|---|---|
| private static final boolean DEFAULT_USE_CACHE_FOR_ALL_THREADS | |
| directArenaMetrics | back to summary |
|---|---|
| private final List<PoolArenaMetric> directArenaMetrics | |
| directArenas | back to summary |
|---|---|
| private final PoolArena<ByteBuffer>[] directArenas | |
| heapArenaMetrics | back to summary |
|---|---|
| private final List<PoolArenaMetric> heapArenaMetrics | |
| heapArenas | back to summary |
|---|---|
| private final PoolArena<byte[]>[] heapArenas | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| MAX_CHUNK_SIZE | back to summary |
|---|---|
| private static final int MAX_CHUNK_SIZE | |
| metric | back to summary |
|---|---|
| private final PooledByteBufAllocatorMetric metric | |
| MIN_PAGE_SIZE | back to summary |
|---|---|
| private static final int MIN_PAGE_SIZE | |
| normalCacheSize | back to summary |
|---|---|
| private final int normalCacheSize | |
| smallCacheSize | back to summary |
|---|---|
| private final int smallCacheSize | |
| threadCache | back to summary |
|---|---|
| private final PooledByteBufAllocator. | |
| trimTask | back to summary |
|---|---|
| private final Runnable trimTask | |
| PooledByteBufAllocator | back to summary |
|---|---|
| public PooledByteBufAllocator() | |
| PooledByteBufAllocator | back to summary |
|---|---|
public PooledByteBufAllocator(boolean preferDirect)
| |
| PooledByteBufAllocator | back to summary |
|---|---|
public PooledByteBufAllocator(int nHeapArena, int nDirectArena, int pageSize, int maxOrder)
| |
| PooledByteBufAllocator | back to summary |
|---|---|
| public PooledByteBufAllocator(boolean preferDirect, int nHeapArena, int nDirectArena, int pageSize, int maxOrder)
Deprecated use
| |
| PooledByteBufAllocator | back to summary |
|---|---|
| public PooledByteBufAllocator(boolean preferDirect, int nHeapArena, int nDirectArena, int pageSize, int maxOrder, int tinyCacheSize, int smallCacheSize, int normalCacheSize)
Deprecated use
| |
| PooledByteBufAllocator | back to summary |
|---|---|
| public PooledByteBufAllocator(boolean preferDirect, int nHeapArena, int nDirectArena, int pageSize, int maxOrder, int tinyCacheSize, int smallCacheSize, int normalCacheSize, boolean useCacheForAllThreads)
Deprecated use
| |
| PooledByteBufAllocator | back to summary |
|---|---|
| public PooledByteBufAllocator(boolean preferDirect, int nHeapArena, int nDirectArena, int pageSize, int maxOrder, int smallCacheSize, int normalCacheSize, boolean useCacheForAllThreads) | |
| PooledByteBufAllocator | back to summary |
|---|---|
| public PooledByteBufAllocator(boolean preferDirect, int nHeapArena, int nDirectArena, int pageSize, int maxOrder, int tinyCacheSize, int smallCacheSize, int normalCacheSize, boolean useCacheForAllThreads, int directMemoryCacheAlignment)
Deprecated use
| |
| PooledByteBufAllocator | back to summary |
|---|---|
| public PooledByteBufAllocator(boolean preferDirect, int nHeapArena, int nDirectArena, int pageSize, int maxOrder, int smallCacheSize, int normalCacheSize, boolean useCacheForAllThreads, int directMemoryCacheAlignment) | |
| chunkSize | back to summary |
|---|---|
| public final int chunkSize()
Deprecated Return the chunk size for an arena.
| |
| defaultMaxOrder | back to summary |
|---|---|
| public static int defaultMaxOrder() Default maximum order - System Property: io.netty.allocator.maxOrder - default 9 | |
| defaultNormalCacheSize | back to summary |
|---|---|
| public static int defaultNormalCacheSize() Default normal cache size - System Property: io.netty.allocator.normalCacheSize - default 64 | |
| defaultNumDirectArena | back to summary |
|---|---|
| public static int defaultNumDirectArena() Default number of direct arenas - System Property: io.netty.allocator.numDirectArenas - default 2 * cores | |
| defaultNumHeapArena | back to summary |
|---|---|
| public static int defaultNumHeapArena() Default number of heap arenas - System Property: io.netty.allocator.numHeapArenas - default 2 * cores | |
| defaultPageSize | back to summary |
|---|---|
| public static int defaultPageSize() Default buffer page size - System Property: io.netty.allocator.pageSize - default 8192 | |
| defaultPreferDirect | back to summary |
|---|---|
| public static boolean defaultPreferDirect() Default prefer direct - System Property: io.netty.noPreferDirect - default false | |
| defaultSmallCacheSize | back to summary |
|---|---|
| public static int defaultSmallCacheSize() Default small cache size - System Property: io.netty.allocator.smallCacheSize - default 256 | |
| defaultTinyCacheSize | back to summary |
|---|---|
| public static int defaultTinyCacheSize()
Deprecated Tiny caches have been merged into small caches. Default tiny cache size - default 0
| |
| defaultUseCacheForAllThreads | back to summary |
|---|---|
| public static boolean defaultUseCacheForAllThreads() Default thread caching behavior - System Property: io.netty.allocator.useCacheForAllThreads - default false | |
| directArenas | back to summary |
|---|---|
| public List Deprecated Return a
| |
| dumpStats | back to summary |
|---|---|
| public String dumpStats() Returns the status of the allocator (which contains all metrics) as string. Be aware this may be expensive and so should not called too frequently. | |
| freeThreadLocalCache | back to summary |
|---|---|
| public void freeThreadLocalCache()
Deprecated will be removed
Free all cached buffers for the calling
| |
| hasThreadLocalCache | back to summary |
|---|---|
| public boolean hasThreadLocalCache()
Deprecated will be removed
Returns
| |
| heapArenas | back to summary |
|---|---|
| public List Deprecated Return a
| |
| isDirectBufferPooled | back to summary |
|---|---|
| public boolean isDirectBufferPooled() Implements io. Doc from io. Returns
| |
| isDirectMemoryCacheAlignmentSupported | back to summary |
|---|---|
| public static boolean isDirectMemoryCacheAlignmentSupported() Return | |
| metric | back to summary |
|---|---|
| public PooledByteBufAllocatorMetric metric() Implements io. Doc from io. Returns a
| |
| newArenaArray | back to summary |
|---|---|
private static <T> PoolArena
| |
| newDirectBuffer | back to summary |
|---|---|
| protected ByteBuf newDirectBuffer(int initialCapacity, int maxCapacity) Implements abstract io. Doc from io. Create a direct
| |
| newHeapBuffer | back to summary |
|---|---|
| protected ByteBuf newHeapBuffer(int initialCapacity, int maxCapacity) Implements abstract io. Doc from io. Create a heap
| |
| normalCacheSize | back to summary |
|---|---|
| public int normalCacheSize()
Deprecated Return the size of the normal cache.
| |
| numDirectArenas | back to summary |
|---|---|
| public int numDirectArenas()
Deprecated Return the number of direct arenas.
| |
| numHeapArenas | back to summary |
|---|---|
| public int numHeapArenas()
Deprecated Return the number of heap arenas.
| |
| numThreadLocalCaches | back to summary |
|---|---|
| public int numThreadLocalCaches()
Deprecated Return the number of thread local caches used by this
| |
| pinnedDirectMemory | back to summary |
|---|---|
| public final long pinnedDirectMemory() Returns the number of bytes of direct memory that is currently pinned to direct buffers allocated by a
| |
| pinnedHeapMemory | back to summary |
|---|---|
| public final long pinnedHeapMemory() Returns the number of bytes of heap memory that is currently pinned to heap buffers allocated by a
| |
| pinnedMemory | back to summary |
|---|---|
| private static long pinnedMemory(PoolArena<?>[] arenas) | |
| smallCacheSize | back to summary |
|---|---|
| public int smallCacheSize()
Deprecated Return the size of the small cache.
| |
| threadCache | back to summary |
|---|---|
| pack-priv final PoolThreadCache threadCache() | |
| tinyCacheSize | back to summary |
|---|---|
| public int tinyCacheSize()
Deprecated Return the size of the tiny cache.
| |
| trimCurrentThreadCache | back to summary |
|---|---|
| public boolean trimCurrentThreadCache() Trim thread local cache for the current | |
| usedDirectMemory | back to summary |
|---|---|
| pack-priv final long usedDirectMemory() | |
| usedHeapMemory | back to summary |
|---|---|
| pack-priv final long usedHeapMemory() | |
| usedMemory | back to summary |
|---|---|
| private static long usedMemory(PoolArena<?>[] arenas) | |
| validateAndCalculateChunkSize | back to summary |
|---|---|
| private static int validateAndCalculateChunkSize(int pageSize, int maxOrder) | |
| validateAndCalculatePageShifts | back to summary |
|---|---|
| private static int validateAndCalculatePageShifts(int pageSize, int alignment) | |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected synchronized PoolThreadCache | initialValue()
Overrides io. |
| private <T> PoolArena | |
| protected void | onRemoval(PoolThreadCache threadCache)
Overrides io. remove().
|
| useCacheForAllThreads | back to summary |
|---|---|
| private final boolean useCacheForAllThreads | |
| PoolThreadLocalCache | back to summary |
|---|---|
| pack-priv PoolThreadLocalCache(boolean useCacheForAllThreads) | |
| initialValue | back to summary |
|---|---|
| protected synchronized PoolThreadCache initialValue() Overrides io. Doc from io. Returns the initial value for this thread-local variable.
| |
| leastUsedArena | back to summary |
|---|---|
| private <T> PoolArena | |
| onRemoval | back to summary |
|---|---|
| protected void onRemoval(PoolThreadCache threadCache) Overrides io. Doc from io. Invoked when this thread local variable is removed by
| |