Interface ByteBufferPool

All Known Implementing Classes:
DirectByteBufferPool, IOHub, ProtocolStack

public interface ByteBufferPool
API for a pool of ByteBuffers.
  • Method Summary

    Modifier and Type
    Method
    Description
    acquire(int size)
    Borrow a buffer from the pool.
    void
    Returns a buffer to the pool.
  • Method Details

    • acquire

      ByteBuffer acquire(int size)
      Borrow a buffer from the pool.
      Parameters:
      size - The minimum size and initial limit of the buffer.
      Returns:
      the buffer.
    • release

      void release(ByteBuffer buffer)
      Returns a buffer to the pool.
      Parameters:
      buffer - the buffer.