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 voidacquire()Increments the retained counter of this buffer.dump()intgetSize()booleanChecks ifRetainableByteBuffer.retain()has been called at least one more time thanRetainableByteBuffer.release().booleanrelease()Decrements the retained counter of this buffer.voidretain()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:RetainableByteBufferIncrements 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:
acquirein classRetainableByteBuffer
-
isRetained
public boolean isRetained()Description copied from class:RetainableByteBufferChecks ifRetainableByteBuffer.retain()has been called at least one more time thanRetainableByteBuffer.release().- Overrides:
isRetainedin classRetainableByteBuffer- Returns:
- true if this buffer is retained, false otherwise.
-
retain
public void retain()Description copied from class:RetainableByteBufferIncrements the retained counter of this buffer.- Specified by:
retainin interfaceRetainable- Overrides:
retainin classRetainableByteBuffer
-
release
public boolean release()Description copied from class:RetainableByteBufferDecrements the retained counter of this buffer.- Overrides:
releasein classRetainableByteBuffer- Returns:
- true if the buffer was re-pooled, false otherwise.
-
dump
-