Class NettyBufferPool

java.lang.Object
org.apache.flink.queryablestate.network.NettyBufferPool
All Implemented Interfaces:
org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator

public class NettyBufferPool extends Object implements org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
Wrapper around Netty's PooledByteBufAllocator with strict control over the number of created arenas.
  • Field Summary

    Fields inherited from interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator

    DEFAULT
  • Constructor Summary

    Constructors
    Constructor
    Description
    NettyBufferPool(int numberOfArenas)
    Creates Netty's buffer pool with the specified number of direct arenas.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf
     
    org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf
    buffer(int initialCapacity)
     
    org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf
    buffer(int initialCapacity, int maxCapacity)
     
    int
    calculateNewCapacity(int minNewCapacity, int maxCapacity)
     
    org.apache.flink.shaded.netty4.io.netty.buffer.CompositeByteBuf
     
    org.apache.flink.shaded.netty4.io.netty.buffer.CompositeByteBuf
    compositeBuffer(int maxNumComponents)
     
    org.apache.flink.shaded.netty4.io.netty.buffer.CompositeByteBuf
     
    org.apache.flink.shaded.netty4.io.netty.buffer.CompositeByteBuf
    compositeDirectBuffer(int maxNumComponents)
     
    org.apache.flink.shaded.netty4.io.netty.buffer.CompositeByteBuf
     
    org.apache.flink.shaded.netty4.io.netty.buffer.CompositeByteBuf
    compositeHeapBuffer(int maxNumComponents)
     
    org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf
     
    org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf
    directBuffer(int initialCapacity)
     
    org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf
    directBuffer(int initialCapacity, int maxCapacity)
     
    org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf
     
    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)
     
    org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf
     
    org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf
    ioBuffer(int initialCapacity)
     
    org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf
    ioBuffer(int initialCapacity, int maxCapacity)
     
    boolean
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NettyBufferPool

      public NettyBufferPool(int numberOfArenas)
      Creates Netty's buffer pool with the specified number of direct arenas.
      Parameters:
      numberOfArenas - Number of arenas (recommended: 2 * number of task slots)
  • Method Details

    • buffer

      public org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf buffer()
      Specified by:
      buffer in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • buffer

      public org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf buffer(int initialCapacity)
      Specified by:
      buffer in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • buffer

      public org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf buffer(int initialCapacity, int maxCapacity)
      Specified by:
      buffer in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • ioBuffer

      public org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf ioBuffer()
      Specified by:
      ioBuffer in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • ioBuffer

      public org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf ioBuffer(int initialCapacity)
      Specified by:
      ioBuffer in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • ioBuffer

      public org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf ioBuffer(int initialCapacity, int maxCapacity)
      Specified by:
      ioBuffer in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • heapBuffer

      public org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf heapBuffer()
      Specified by:
      heapBuffer in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • heapBuffer

      public org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf heapBuffer(int initialCapacity)
      Specified by:
      heapBuffer in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • heapBuffer

      public org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf heapBuffer(int initialCapacity, int maxCapacity)
      Specified by:
      heapBuffer in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • directBuffer

      public org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf directBuffer()
      Specified by:
      directBuffer in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • directBuffer

      public org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf directBuffer(int initialCapacity)
      Specified by:
      directBuffer in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • directBuffer

      public org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf directBuffer(int initialCapacity, int maxCapacity)
      Specified by:
      directBuffer in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • compositeBuffer

      public org.apache.flink.shaded.netty4.io.netty.buffer.CompositeByteBuf compositeBuffer()
      Specified by:
      compositeBuffer in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • compositeBuffer

      public org.apache.flink.shaded.netty4.io.netty.buffer.CompositeByteBuf compositeBuffer(int maxNumComponents)
      Specified by:
      compositeBuffer in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • compositeHeapBuffer

      public org.apache.flink.shaded.netty4.io.netty.buffer.CompositeByteBuf compositeHeapBuffer()
      Specified by:
      compositeHeapBuffer in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • compositeHeapBuffer

      public org.apache.flink.shaded.netty4.io.netty.buffer.CompositeByteBuf compositeHeapBuffer(int maxNumComponents)
      Specified by:
      compositeHeapBuffer in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • compositeDirectBuffer

      public org.apache.flink.shaded.netty4.io.netty.buffer.CompositeByteBuf compositeDirectBuffer()
      Specified by:
      compositeDirectBuffer in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • compositeDirectBuffer

      public org.apache.flink.shaded.netty4.io.netty.buffer.CompositeByteBuf compositeDirectBuffer(int maxNumComponents)
      Specified by:
      compositeDirectBuffer in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • isDirectBufferPooled

      public boolean isDirectBufferPooled()
      Specified by:
      isDirectBufferPooled in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator
    • calculateNewCapacity

      public int calculateNewCapacity(int minNewCapacity, int maxCapacity)
      Specified by:
      calculateNewCapacity in interface org.apache.flink.shaded.netty4.io.netty.buffer.ByteBufAllocator