Package org.eclipse.jetty.io
Class ArrayRetainableByteBufferPool.Tracking.Buffer
java.lang.Object
org.eclipse.jetty.io.RetainableByteBuffer
org.eclipse.jetty.io.ArrayRetainableByteBufferPool.Tracking.Buffer
- All Implemented Interfaces:
Retainable
- Enclosing class:
- ArrayRetainableByteBufferPool.Tracking
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
acquire()
Increments the retained counter of this buffer.dump()
int
getSize()
boolean
Checks ifRetainableByteBuffer.retain()
has been called at least one more time thanRetainableByteBuffer.release()
.boolean
release()
Decrements the retained counter of this buffer.void
retain()
Increments the retained counter of this buffer.Methods inherited from class org.eclipse.jetty.io.RetainableByteBuffer
capacity, clear, getBuffer, getLastUpdate, hasRemaining, isDirect, isEmpty, remaining, toString
-
Method Details
-
getSize
public int getSize() -
getAcquireInstant
-
getAcquireStack
-
acquire
protected void acquire()Description copied from class:RetainableByteBuffer
Increments the retained counter of this buffer. It must be done internally by the pool right after creation and after each un-pooling. The reason why this method exists on top ofRetainableByteBuffer.retain()
is to be able to have some safety checks that must know why the ref counter is being incremented.- Overrides:
acquire
in classRetainableByteBuffer
-
isRetained
public boolean isRetained()Description copied from class:RetainableByteBuffer
Checks ifRetainableByteBuffer.retain()
has been called at least one more time thanRetainableByteBuffer.release()
.- Overrides:
isRetained
in classRetainableByteBuffer
- Returns:
- true if this buffer is retained, false otherwise.
-
retain
public void retain()Description copied from class:RetainableByteBuffer
Increments the retained counter of this buffer.- Specified by:
retain
in interfaceRetainable
- Overrides:
retain
in classRetainableByteBuffer
-
release
public boolean release()Description copied from class:RetainableByteBuffer
Decrements the retained counter of this buffer.- Overrides:
release
in classRetainableByteBuffer
- Returns:
- true if the buffer was re-pooled, false otherwise.
-
dump
-