Interface PooledDataBuffer

All Superinterfaces:
DataBuffer, TouchableDataBuffer
All Known Implementing Classes:
NettyDataBuffer

public interface PooledDataBuffer extends TouchableDataBuffer
Extension of DataBuffer that allows for buffers that share a memory pool. Introduces methods for reference counting.
Since:
5.0
Author:
Arjen Poutsma
  • Method Details

    • isAllocated

      boolean isAllocated()
      Return true if this buffer is allocated; false if it has been deallocated.
      Since:
      5.1
    • retain

      Increase the reference count for this buffer by one.
      Returns:
      this buffer
    • touch

      PooledDataBuffer touch(Object hint)
      Associate the given hint with the data buffer for debugging purposes.
      Specified by:
      touch in interface TouchableDataBuffer
      Returns:
      this buffer
      Since:
      5.3.2
    • release

      boolean release()
      Decrease the reference count for this buffer by one, and deallocate it once the count reaches zero.
      Returns:
      true if the buffer was deallocated; false otherwise