public class NettyBufferPool
extends org.apache.flink.shaded.netty4.io.netty.buffer.PooledByteBufAllocator
PooledByteBufAllocator
with strict control over the number of
created arenas.Constructor and Description |
---|
NettyBufferPool(int numberOfArenas)
Creates Netty's buffer pool with the specified number of direct arenas.
|
Modifier and Type | Method and Description |
---|---|
org.apache.flink.shaded.netty4.io.netty.buffer.CompositeByteBuf |
compositeHeapBuffer() |
org.apache.flink.shaded.netty4.io.netty.buffer.CompositeByteBuf |
compositeHeapBuffer(int maxNumComponents) |
Optional<Long> |
getNumberOfAllocatedBytes()
Returns the number of currently allocated bytes.
|
org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf |
heapBuffer() |
org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf |
heapBuffer(int initialCapacity) |
org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf |
heapBuffer(int initialCapacity,
int maxCapacity) |
chunkSize, defaultMaxOrder, defaultNormalCacheSize, defaultNumDirectArena, defaultNumHeapArena, defaultPageSize, defaultPreferDirect, defaultSmallCacheSize, defaultTinyCacheSize, defaultUseCacheForAllThreads, directArenas, dumpStats, freeThreadLocalCache, hasThreadLocalCache, heapArenas, isDirectBufferPooled, isDirectMemoryCacheAlignmentSupported, metric, newDirectBuffer, newHeapBuffer, normalCacheSize, numDirectArenas, numHeapArenas, numThreadLocalCaches, pinnedDirectMemory, pinnedHeapMemory, smallCacheSize, tinyCacheSize, trimCurrentThreadCache
buffer, buffer, buffer, calculateNewCapacity, compositeBuffer, compositeBuffer, compositeDirectBuffer, compositeDirectBuffer, directBuffer, directBuffer, directBuffer, ioBuffer, ioBuffer, ioBuffer, toLeakAwareBuffer, toLeakAwareBuffer, toString
public NettyBufferPool(int numberOfArenas)
numberOfArenas
- Number of arenas (recommended: 2 * number of task slots)public Optional<Long> getNumberOfAllocatedBytes() throws NoSuchFieldException, IllegalAccessException
The stats are gathered via Reflection and are mostly relevant for debugging purposes.
NoSuchFieldException
- Error getting the statistics (should not happen when the Netty
version stays the same).IllegalAccessException
- Error getting the statistics (should not happen when the Netty
version stays the same).public org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf heapBuffer()
heapBuffer
in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
heapBuffer
in class org.apache.flink.shaded.netty4.io.netty.buffer.AbstractByteBufAllocator
public org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf heapBuffer(int initialCapacity)
heapBuffer
in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
heapBuffer
in class org.apache.flink.shaded.netty4.io.netty.buffer.AbstractByteBufAllocator
public org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf heapBuffer(int initialCapacity, int maxCapacity)
heapBuffer
in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
heapBuffer
in class org.apache.flink.shaded.netty4.io.netty.buffer.AbstractByteBufAllocator
public org.apache.flink.shaded.netty4.io.netty.buffer.CompositeByteBuf compositeHeapBuffer()
compositeHeapBuffer
in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
compositeHeapBuffer
in class org.apache.flink.shaded.netty4.io.netty.buffer.AbstractByteBufAllocator
public org.apache.flink.shaded.netty4.io.netty.buffer.CompositeByteBuf compositeHeapBuffer(int maxNumComponents)
compositeHeapBuffer
in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
compositeHeapBuffer
in class org.apache.flink.shaded.netty4.io.netty.buffer.AbstractByteBufAllocator
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.