Class NoPool

java.lang.Object
com.github.luben.zstd.NoPool
All Implemented Interfaces:
BufferPool

public class NoPool extends Object implements BufferPool
Implementation of `BufferPool` that does not recycle buffers.
  • Field Details

    • INSTANCE

      public static final BufferPool INSTANCE
  • Constructor Details

    • NoPool

      private NoPool()
  • Method Details

    • get

      public ByteBuffer get(int capacity)
      Description copied from interface: BufferPool
      Fetch a buffer from the pool.
      Specified by:
      get in interface BufferPool
      Parameters:
      capacity - the desired size of the buffer
      Returns:
      a heap buffer with size at least the `capacity` and arrayOffset of 0
    • release

      public void release(ByteBuffer buffer)
      Description copied from interface: BufferPool
      Return a buffer to the pool.
      Specified by:
      release in interface BufferPool
      Parameters:
      buffer - the buffer to return