Package org.eclipse.jetty.io
Class RetainableByteBuffer
- java.lang.Object
-
- org.eclipse.jetty.io.RetainableByteBuffer
-
- All Implemented Interfaces:
Retainable
@Deprecated(since="2021-05-27") public class RetainableByteBuffer extends java.lang.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
ByteBufferPooland maintains a reference count that is initially 1, incremented withretain()and decremented withrelease(). The buffer is released to the pool when the reference count is decremented to 0.
-
-
Constructor Summary
Constructors Constructor Description RetainableByteBuffer(ByteBufferPool pool, int size)Deprecated.RetainableByteBuffer(ByteBufferPool pool, int size, boolean direct)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclear()Deprecated.java.nio.ByteBuffergetBuffer()Deprecated.intgetReferences()Deprecated.booleanhasRemaining()Deprecated.booleanisEmpty()Deprecated.intrelease()Deprecated.intremaining()Deprecated.voidretain()Deprecated.java.lang.StringtoString()Deprecated.
-
-
-
Constructor Detail
-
RetainableByteBuffer
public RetainableByteBuffer(ByteBufferPool pool, int size)
Deprecated.
-
RetainableByteBuffer
public RetainableByteBuffer(ByteBufferPool pool, int size, boolean direct)
Deprecated.
-
-
Method Detail
-
getBuffer
public java.nio.ByteBuffer getBuffer()
Deprecated.
-
getReferences
public int getReferences()
Deprecated.
-
retain
public void retain()
Deprecated.- Specified by:
retainin interfaceRetainable
-
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 java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
-