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) |
scala.Option<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) |
freeThreadLocalCache, hasThreadLocalCache, isDirectBufferPooled, newDirectBuffer, newHeapBuffer
buffer, buffer, buffer, compositeBuffer, compositeBuffer, compositeDirectBuffer, compositeDirectBuffer, directBuffer, directBuffer, directBuffer, ioBuffer, ioBuffer, ioBuffer, toLeakAwareBuffer, toString
public NettyBufferPool(int numberOfArenas)
numberOfArenas
- Number of arenas (recommended: 2 * number of task
slots)public scala.Option<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–2019 The Apache Software Foundation. All rights reserved.