Class AbstractDerivedByteBuf

All Implemented Interfaces:
ByteBufConvertible, ReferenceCounted, Comparable<ByteBuf>
Direct Known Subclasses:
AbstractUnpooledSlicedByteBuf, DuplicatedByteBuf, ReadOnlyByteBuf

@Deprecated public abstract class AbstractDerivedByteBuf extends AbstractByteBuf
Deprecated.
Do not use.
Abstract base class for ByteBuf implementations that wrap another ByteBuf.
  • Constructor Details

    • AbstractDerivedByteBuf

      protected AbstractDerivedByteBuf(int maxCapacity)
      Deprecated.
  • Method Details

    • isAccessible

      final boolean isAccessible()
      Deprecated.
      Description copied from class: ByteBuf
      Used internally by AbstractByteBuf.ensureAccessible() to try to guard against using the buffer after it was released (best-effort).
      Overrides:
      isAccessible in class ByteBuf
    • isAccessible0

      boolean isAccessible0()
      Deprecated.
    • refCnt

      public final int refCnt()
      Deprecated.
      Description copied from interface: ReferenceCounted
      Returns the reference count of this object. If 0, it means this object has been deallocated.
    • refCnt0

      int refCnt0()
      Deprecated.
    • retain

      public final ByteBuf retain()
      Deprecated.
      Description copied from interface: ReferenceCounted
      Increases the reference count by 1.
      Specified by:
      retain in interface ReferenceCounted
      Specified by:
      retain in class ByteBuf
    • retain0

      ByteBuf retain0()
      Deprecated.
    • retain

      public final ByteBuf retain(int increment)
      Deprecated.
      Description copied from interface: ReferenceCounted
      Increases the reference count by the specified increment.
      Specified by:
      retain in interface ReferenceCounted
      Specified by:
      retain in class ByteBuf
    • retain0

      ByteBuf retain0(int increment)
      Deprecated.
    • touch

      public final ByteBuf touch()
      Deprecated.
      Description copied from interface: ReferenceCounted
      Records the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector. This method is a shortcut to touch(null).
      Specified by:
      touch in interface ReferenceCounted
      Specified by:
      touch in class ByteBuf
    • touch0

      ByteBuf touch0()
      Deprecated.
    • touch

      public final ByteBuf touch(Object hint)
      Deprecated.
      Description copied from interface: ReferenceCounted
      Records the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector.
      Specified by:
      touch in interface ReferenceCounted
      Specified by:
      touch in class ByteBuf
    • touch0

      ByteBuf touch0(Object hint)
      Deprecated.
    • release

      public final boolean release()
      Deprecated.
      Description copied from interface: ReferenceCounted
      Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.
      Returns:
      true if and only if the reference count became 0 and this object has been deallocated
    • release0

      boolean release0()
      Deprecated.
    • release

      public final boolean release(int decrement)
      Deprecated.
      Description copied from interface: ReferenceCounted
      Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.
      Returns:
      true if and only if the reference count became 0 and this object has been deallocated
    • release0

      boolean release0(int decrement)
      Deprecated.
    • isReadOnly

      public boolean isReadOnly()
      Deprecated.
      Description copied from class: ByteBuf
      Returns true if and only if this buffer is read-only.
      Overrides:
      isReadOnly in class AbstractByteBuf
    • internalNioBuffer

      public ByteBuffer internalNioBuffer(int index, int length)
      Deprecated.
      Description copied from class: ByteBuf
      Internal use only: Exposes the internal NIO buffer.
      Specified by:
      internalNioBuffer in class ByteBuf
    • nioBuffer

      public ByteBuffer nioBuffer(int index, int length)
      Deprecated.
      Description copied from class: ByteBuf
      Exposes this buffer's sub-region as an NIO ByteBuffer. The returned buffer either share or contains the copied content of this buffer, while changing the position and limit of the returned NIO buffer does not affect the indexes and marks of this buffer. This method does not modify readerIndex or writerIndex of this buffer. Please note that the returned NIO buffer will not see the changes of this buffer if this buffer is a dynamic buffer and it adjusted its capacity.
      Specified by:
      nioBuffer in class ByteBuf
      See Also:
    • isContiguous

      public boolean isContiguous()
      Deprecated.
      Description copied from class: ByteBuf
      Returns true if this ByteBuf implementation is backed by a single memory region. Composite buffer implementations must return false even if they currently hold ≤ 1 components. For buffers that return true, it's guaranteed that a successful call to ByteBuf.discardReadBytes() will increase the value of ByteBuf.maxFastWritableBytes() by the current readerIndex.

      This method will return false by default, and a false return value does not necessarily mean that the implementation is composite or that it is not backed by a single memory region.

      Overrides:
      isContiguous in class ByteBuf