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 of ByteBufAllocator.
  • Field Summary

    Fields inherited from interface io.netty.buffer.ByteBufAllocator

    DEFAULT
  • Constructor Summary

    Constructors
    Constructor
    Description
    ByteBufAllocatorImpl(io.netty.buffer.ByteBufAllocator pooledAllocator, io.netty.buffer.ByteBufAllocator unpooledAllocator, PoolingPolicy poolingPolicy, int poolingConcurrency, OutOfMemoryPolicy outOfMemoryPolicy, Consumer<OutOfMemoryError> outOfMemoryListener, LeakDetectionPolicy leakDetectionPolicy)
     
    ByteBufAllocatorImpl(io.netty.buffer.ByteBufAllocator pooledAllocator, io.netty.buffer.ByteBufAllocator unpooledAllocator, PoolingPolicy poolingPolicy, int poolingConcurrency, OutOfMemoryPolicy outOfMemoryPolicy, Consumer<OutOfMemoryError> outOfMemoryListener, LeakDetectionPolicy leakDetectionPolicy, boolean exitOnOutOfMemory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.netty.buffer.ByteBuf
     
    io.netty.buffer.ByteBuf
    buffer(int initialCapacity)
     
    io.netty.buffer.ByteBuf
    buffer(int initialCapacity, int maxCapacity)
     
    boolean
     
    protected io.netty.buffer.ByteBuf
    newDirectBuffer(int initialCapacity, int maxCapacity)
     
    protected io.netty.buffer.ByteBuf
    newHeapBuffer(int initialCapacity, int maxCapacity)
     
    void
     

    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 Details

  • Method Details

    • buffer

      public io.netty.buffer.ByteBuf buffer()
      Specified by:
      buffer in interface io.netty.buffer.ByteBufAllocator
      Overrides:
      buffer in class io.netty.buffer.AbstractByteBufAllocator
    • buffer

      public io.netty.buffer.ByteBuf buffer(int initialCapacity)
      Specified by:
      buffer in interface io.netty.buffer.ByteBufAllocator
      Overrides:
      buffer in class io.netty.buffer.AbstractByteBufAllocator
    • buffer

      public io.netty.buffer.ByteBuf buffer(int initialCapacity, int maxCapacity)
      Specified by:
      buffer in interface io.netty.buffer.ByteBufAllocator
      Overrides:
      buffer in class io.netty.buffer.AbstractByteBufAllocator
    • newHeapBuffer

      protected io.netty.buffer.ByteBuf newHeapBuffer(int initialCapacity, int maxCapacity)
      Specified by:
      newHeapBuffer in class io.netty.buffer.AbstractByteBufAllocator
    • newDirectBuffer

      protected io.netty.buffer.ByteBuf newDirectBuffer(int initialCapacity, int maxCapacity)
      Specified by:
      newDirectBuffer in class io.netty.buffer.AbstractByteBufAllocator
    • isDirectBufferPooled

      public boolean isDirectBufferPooled()
      Specified by:
      isDirectBufferPooled in interface io.netty.buffer.ByteBufAllocator
    • setOomHandler

      public void setOomHandler(Consumer<OutOfMemoryError> handler)
      Specified by:
      setOomHandler in interface ByteBufAllocatorWithOomHandler