Class ByteBufAllocatorImpl
- java.lang.Object
-
- io.netty.buffer.AbstractByteBufAllocator
-
- org.apache.bookkeeper.common.allocator.impl.ByteBufAllocatorImpl
-
- All Implemented Interfaces:
io.netty.buffer.ByteBufAllocator
,ByteBufAllocatorWithOomHandler
public class ByteBufAllocatorImpl extends io.netty.buffer.AbstractByteBufAllocator implements ByteBufAllocatorWithOomHandler
Implementation ofByteBufAllocator
.
-
-
Constructor Summary
Constructors Constructor Description ByteBufAllocatorImpl(io.netty.buffer.ByteBufAllocator pooledAllocator, io.netty.buffer.ByteBufAllocator unpooledAllocator, PoolingPolicy poolingPolicy, int poolingConcurrency, OutOfMemoryPolicy outOfMemoryPolicy, java.util.function.Consumer<java.lang.OutOfMemoryError> outOfMemoryListener, LeakDetectionPolicy leakDetectionPolicy)
ByteBufAllocatorImpl(io.netty.buffer.ByteBufAllocator pooledAllocator, io.netty.buffer.ByteBufAllocator unpooledAllocator, PoolingPolicy poolingPolicy, int poolingConcurrency, OutOfMemoryPolicy outOfMemoryPolicy, java.util.function.Consumer<java.lang.OutOfMemoryError> outOfMemoryListener, LeakDetectionPolicy leakDetectionPolicy, boolean exitOnOutOfMemory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty.buffer.ByteBuf
buffer()
io.netty.buffer.ByteBuf
buffer(int initialCapacity)
io.netty.buffer.ByteBuf
buffer(int initialCapacity, int maxCapacity)
boolean
isDirectBufferPooled()
protected io.netty.buffer.ByteBuf
newDirectBuffer(int initialCapacity, int maxCapacity)
protected io.netty.buffer.ByteBuf
newHeapBuffer(int initialCapacity, int maxCapacity)
void
setOomHandler(java.util.function.Consumer<java.lang.OutOfMemoryError> handler)
-
Methods inherited from class io.netty.buffer.AbstractByteBufAllocator
calculateNewCapacity, compositeBuffer, compositeBuffer, compositeDirectBuffer, compositeDirectBuffer, compositeHeapBuffer, compositeHeapBuffer, directBuffer, directBuffer, directBuffer, heapBuffer, heapBuffer, heapBuffer, ioBuffer, ioBuffer, ioBuffer, toLeakAwareBuffer, toLeakAwareBuffer, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.netty.buffer.ByteBufAllocator
calculateNewCapacity, compositeBuffer, compositeBuffer, compositeDirectBuffer, compositeDirectBuffer, compositeHeapBuffer, compositeHeapBuffer, directBuffer, directBuffer, directBuffer, heapBuffer, heapBuffer, heapBuffer, ioBuffer, ioBuffer, ioBuffer
-
-
-
-
Constructor Detail
-
ByteBufAllocatorImpl
ByteBufAllocatorImpl(io.netty.buffer.ByteBufAllocator pooledAllocator, io.netty.buffer.ByteBufAllocator unpooledAllocator, PoolingPolicy poolingPolicy, int poolingConcurrency, OutOfMemoryPolicy outOfMemoryPolicy, java.util.function.Consumer<java.lang.OutOfMemoryError> outOfMemoryListener, LeakDetectionPolicy leakDetectionPolicy)
-
ByteBufAllocatorImpl
ByteBufAllocatorImpl(io.netty.buffer.ByteBufAllocator pooledAllocator, io.netty.buffer.ByteBufAllocator unpooledAllocator, PoolingPolicy poolingPolicy, int poolingConcurrency, OutOfMemoryPolicy outOfMemoryPolicy, java.util.function.Consumer<java.lang.OutOfMemoryError> outOfMemoryListener, LeakDetectionPolicy leakDetectionPolicy, boolean exitOnOutOfMemory)
-
-
Method Detail
-
buffer
public io.netty.buffer.ByteBuf buffer()
- Specified by:
buffer
in interfaceio.netty.buffer.ByteBufAllocator
- Overrides:
buffer
in classio.netty.buffer.AbstractByteBufAllocator
-
buffer
public io.netty.buffer.ByteBuf buffer(int initialCapacity)
- Specified by:
buffer
in interfaceio.netty.buffer.ByteBufAllocator
- Overrides:
buffer
in classio.netty.buffer.AbstractByteBufAllocator
-
buffer
public io.netty.buffer.ByteBuf buffer(int initialCapacity, int maxCapacity)
- Specified by:
buffer
in interfaceio.netty.buffer.ByteBufAllocator
- Overrides:
buffer
in classio.netty.buffer.AbstractByteBufAllocator
-
newHeapBuffer
protected io.netty.buffer.ByteBuf newHeapBuffer(int initialCapacity, int maxCapacity)
- Specified by:
newHeapBuffer
in classio.netty.buffer.AbstractByteBufAllocator
-
newDirectBuffer
protected io.netty.buffer.ByteBuf newDirectBuffer(int initialCapacity, int maxCapacity)
- Specified by:
newDirectBuffer
in classio.netty.buffer.AbstractByteBufAllocator
-
isDirectBufferPooled
public boolean isDirectBufferPooled()
- Specified by:
isDirectBufferPooled
in interfaceio.netty.buffer.ByteBufAllocator
-
setOomHandler
public void setOomHandler(java.util.function.Consumer<java.lang.OutOfMemoryError> handler)
- Specified by:
setOomHandler
in interfaceByteBufAllocatorWithOomHandler
-
-