Class RetainableByteBuffer

java.lang.Object
org.eclipse.jetty.io.RetainableByteBuffer
All Implemented Interfaces:
Retainable

@Deprecated(since="2021-05-27") public class RetainableByteBuffer extends Object implements Retainable
Deprecated.
The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
A Retainable ByteBuffer.

Acquires a ByteBuffer from a ByteBufferPool and maintains a reference count that is initially 1, incremented with retain() and decremented with release(). The buffer is released to the pool when the reference count is decremented to 0.

  • Constructor Details

    • RetainableByteBuffer

      public RetainableByteBuffer(ByteBufferPool pool, int size)
      Deprecated.
    • RetainableByteBuffer

      public RetainableByteBuffer(ByteBufferPool pool, int size, boolean direct)
      Deprecated.
  • Method Details

    • getBuffer

      public ByteBuffer getBuffer()
      Deprecated.
    • getReferences

      public int getReferences()
      Deprecated.
    • retain

      public void retain()
      Deprecated.
      Specified by:
      retain in interface Retainable
    • release

      public int release()
      Deprecated.
    • remaining

      public int remaining()
      Deprecated.
    • hasRemaining

      public boolean hasRemaining()
      Deprecated.
    • isEmpty

      public boolean isEmpty()
      Deprecated.
    • clear

      public void clear()
      Deprecated.
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object