接口 PooledDataBuffer

所有超级接口:
DataBuffer, TouchableDataBuffer
所有已知实现类:
NettyDataBuffer

public interface PooledDataBuffer extends TouchableDataBuffer
Extension of DataBuffer that allows for buffers that share a memory pool. Introduces methods for reference counting.
从以下版本开始:
4.0
作者:
Arjen Poutsma, Harry Yang
  • 方法详细资料

    • isAllocated

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

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

      PooledDataBuffer touch(Object hint)
      Associate the given hint with the data buffer for debugging purposes.
      指定者:
      touch 在接口中 TouchableDataBuffer
      返回:
      this buffer
    • release

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