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.ByteBufbuffer()io.netty.buffer.ByteBufbuffer(int initialCapacity)io.netty.buffer.ByteBufbuffer(int initialCapacity, int maxCapacity)booleanisDirectBufferPooled()protected io.netty.buffer.ByteBufnewDirectBuffer(int initialCapacity, int maxCapacity)protected io.netty.buffer.ByteBufnewHeapBuffer(int initialCapacity, int maxCapacity)voidsetOomHandler(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:
bufferin interfaceio.netty.buffer.ByteBufAllocator- Overrides:
bufferin classio.netty.buffer.AbstractByteBufAllocator
-
buffer
public io.netty.buffer.ByteBuf buffer(int initialCapacity)
- Specified by:
bufferin interfaceio.netty.buffer.ByteBufAllocator- Overrides:
bufferin classio.netty.buffer.AbstractByteBufAllocator
-
buffer
public io.netty.buffer.ByteBuf buffer(int initialCapacity, int maxCapacity)- Specified by:
bufferin interfaceio.netty.buffer.ByteBufAllocator- Overrides:
bufferin classio.netty.buffer.AbstractByteBufAllocator
-
newHeapBuffer
protected io.netty.buffer.ByteBuf newHeapBuffer(int initialCapacity, int maxCapacity)- Specified by:
newHeapBufferin classio.netty.buffer.AbstractByteBufAllocator
-
newDirectBuffer
protected io.netty.buffer.ByteBuf newDirectBuffer(int initialCapacity, int maxCapacity)- Specified by:
newDirectBufferin classio.netty.buffer.AbstractByteBufAllocator
-
isDirectBufferPooled
public boolean isDirectBufferPooled()
- Specified by:
isDirectBufferPooledin interfaceio.netty.buffer.ByteBufAllocator
-
setOomHandler
public void setOomHandler(java.util.function.Consumer<java.lang.OutOfMemoryError> handler)
- Specified by:
setOomHandlerin interfaceByteBufAllocatorWithOomHandler
-
-