public class PooledByteBufAllocator extends AbstractByteBufAllocator
| Modifier and Type | Field and Description |
|---|---|
static PooledByteBufAllocator |
DEFAULT |
| Constructor and Description |
|---|
PooledByteBufAllocator() |
PooledByteBufAllocator(boolean preferDirect) |
PooledByteBufAllocator(boolean preferDirect,
int nHeapArena,
int nDirectArena,
int pageSize,
int maxOrder) |
PooledByteBufAllocator(boolean preferDirect,
int nHeapArena,
int nDirectArena,
int pageSize,
int maxOrder,
int tinyCacheSize,
int smallCacheSize,
int normalCacheSize) |
PooledByteBufAllocator(int nHeapArena,
int nDirectArena,
int pageSize,
int maxOrder) |
| Modifier and Type | Method and Description |
|---|---|
static int |
defaultMaxOrder()
Default maximum order - System Property: io.netty.allocator.maxOrder - default 11
|
static int |
defaultNormalCacheSize()
Default normal cache size - System Property: io.netty.allocator.normalCacheSize - default 64
|
static int |
defaultNumDirectArena()
Default numer of direct arenas - System Property: io.netty.allocator.numDirectArenas - default 2 * cores
|
static int |
defaultNumHeapArena()
Default number of heap areanas - System Property: io.netty.allocator.numHeapArenas - default 2 * cores
|
static int |
defaultPageSize()
Default buffer page size - System Property: io.netty.allocator.pageSize - default 8192
|
static int |
defaultSmallCacheSize()
Default small cache size - System Property: io.netty.allocator.smallCacheSize - default 256
|
static int |
defaultTinyCacheSize()
Default tiny cache size - System Property: io.netty.allocator.tinyCacheSize - default 512
|
List<PoolArenaMetric> |
directArenas()
Return a
List of all direct PoolArenaMetrics that are provided by this pool. |
void |
freeThreadLocalCache()
Deprecated.
|
boolean |
hasThreadLocalCache()
Deprecated.
|
List<PoolArenaMetric> |
heapArenas()
Return a
List of all heap PoolArenaMetrics that are provided by this pool. |
boolean |
isDirectBufferPooled()
Returns
true if direct ByteBuf's are pooled |
protected ByteBuf |
newDirectBuffer(int initialCapacity,
int maxCapacity)
Create a direct
ByteBuf with the given initialCapacity and maxCapacity. |
protected ByteBuf |
newHeapBuffer(int initialCapacity,
int maxCapacity)
Create a heap
ByteBuf with the given initialCapacity and maxCapacity. |
int |
normalCacheSize()
Return the size of the normal cache.
|
int |
numDirectArenas()
Return the number of direct arenas.
|
int |
numHeapArenas()
Return the number of heap arenas.
|
int |
numThreadLocalCaches()
Return the number of thread local caches used by this
PooledByteBufAllocator. |
int |
smallCacheSize()
Return the size of the small cache.
|
int |
tinyCacheSize()
Return the size of the tiny cache.
|
buffer, buffer, buffer, calculateNewCapacity, compositeBuffer, compositeBuffer, compositeDirectBuffer, compositeDirectBuffer, compositeHeapBuffer, compositeHeapBuffer, directBuffer, directBuffer, directBuffer, heapBuffer, heapBuffer, heapBuffer, ioBuffer, ioBuffer, ioBuffer, toLeakAwareBuffer, toLeakAwareBuffer, toStringpublic static final PooledByteBufAllocator DEFAULT
public PooledByteBufAllocator()
public PooledByteBufAllocator(boolean preferDirect)
public PooledByteBufAllocator(int nHeapArena,
int nDirectArena,
int pageSize,
int maxOrder)
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)
protected ByteBuf newHeapBuffer(int initialCapacity, int maxCapacity)
AbstractByteBufAllocatorByteBuf with the given initialCapacity and maxCapacity.newHeapBuffer in class AbstractByteBufAllocatorprotected ByteBuf newDirectBuffer(int initialCapacity, int maxCapacity)
AbstractByteBufAllocatorByteBuf with the given initialCapacity and maxCapacity.newDirectBuffer in class AbstractByteBufAllocatorpublic static int defaultNumHeapArena()
public static int defaultNumDirectArena()
public static int defaultPageSize()
public static int defaultMaxOrder()
public static int defaultTinyCacheSize()
public static int defaultSmallCacheSize()
public static int defaultNormalCacheSize()
public boolean isDirectBufferPooled()
ByteBufAllocatortrue if direct ByteBuf's are pooled@Deprecated public boolean hasThreadLocalCache()
@Deprecated public void freeThreadLocalCache()
Thread.public int numHeapArenas()
public int numDirectArenas()
public List<PoolArenaMetric> heapArenas()
List of all heap PoolArenaMetrics that are provided by this pool.public List<PoolArenaMetric> directArenas()
List of all direct PoolArenaMetrics that are provided by this pool.public int numThreadLocalCaches()
PooledByteBufAllocator.public int tinyCacheSize()
public int smallCacheSize()
public int normalCacheSize()
Copyright © 2008–2016 The Netty Project. All rights reserved.