public class NettyBufferPool extends Object implements io.netty.buffer.ByteBufAllocator
PooledByteBufAllocator with strict control
over the number of created arenas.| Modifier and Type | Method and Description |
|---|---|
io.netty.buffer.ByteBuf |
buffer() |
io.netty.buffer.ByteBuf |
buffer(int initialCapacity) |
io.netty.buffer.ByteBuf |
buffer(int initialCapacity,
int maxCapacity) |
io.netty.buffer.CompositeByteBuf |
compositeBuffer() |
io.netty.buffer.CompositeByteBuf |
compositeBuffer(int maxNumComponents) |
io.netty.buffer.CompositeByteBuf |
compositeDirectBuffer() |
io.netty.buffer.CompositeByteBuf |
compositeDirectBuffer(int maxNumComponents) |
io.netty.buffer.CompositeByteBuf |
compositeHeapBuffer() |
io.netty.buffer.CompositeByteBuf |
compositeHeapBuffer(int maxNumComponents) |
io.netty.buffer.ByteBuf |
directBuffer() |
io.netty.buffer.ByteBuf |
directBuffer(int initialCapacity) |
io.netty.buffer.ByteBuf |
directBuffer(int initialCapacity,
int maxCapacity) |
scala.Option<Long> |
getNumberOfAllocatedBytes()
Returns the number of currently allocated bytes.
|
io.netty.buffer.ByteBuf |
heapBuffer() |
io.netty.buffer.ByteBuf |
heapBuffer(int initialCapacity) |
io.netty.buffer.ByteBuf |
heapBuffer(int initialCapacity,
int maxCapacity) |
io.netty.buffer.ByteBuf |
ioBuffer() |
io.netty.buffer.ByteBuf |
ioBuffer(int initialCapacity) |
io.netty.buffer.ByteBuf |
ioBuffer(int initialCapacity,
int maxCapacity) |
boolean |
isDirectBufferPooled() |
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 io.netty.buffer.ByteBuf buffer()
buffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf buffer(int initialCapacity)
buffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf buffer(int initialCapacity,
int maxCapacity)
buffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf ioBuffer()
ioBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf ioBuffer(int initialCapacity)
ioBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf ioBuffer(int initialCapacity,
int maxCapacity)
ioBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf heapBuffer()
heapBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf heapBuffer(int initialCapacity)
heapBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf heapBuffer(int initialCapacity,
int maxCapacity)
heapBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf directBuffer()
directBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf directBuffer(int initialCapacity)
directBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.ByteBuf directBuffer(int initialCapacity,
int maxCapacity)
directBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.CompositeByteBuf compositeBuffer()
compositeBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.CompositeByteBuf compositeBuffer(int maxNumComponents)
compositeBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.CompositeByteBuf compositeHeapBuffer()
compositeHeapBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.CompositeByteBuf compositeHeapBuffer(int maxNumComponents)
compositeHeapBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.CompositeByteBuf compositeDirectBuffer()
compositeDirectBuffer in interface io.netty.buffer.ByteBufAllocatorpublic io.netty.buffer.CompositeByteBuf compositeDirectBuffer(int maxNumComponents)
compositeDirectBuffer in interface io.netty.buffer.ByteBufAllocatorpublic boolean isDirectBufferPooled()
isDirectBufferPooled in interface io.netty.buffer.ByteBufAllocatorCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.