Class ArrayByteBufferPool.Tracking.TrackedBuffer
java.lang.Object
org.eclipse.jetty.io.Retainable.Wrapper
org.eclipse.jetty.io.RetainableByteBuffer.Abstract
org.eclipse.jetty.io.RetainableByteBuffer.FixedCapacity
org.eclipse.jetty.io.ArrayByteBufferPool.Tracking.TrackedBuffer
- All Implemented Interfaces:
Retainable
,RetainableByteBuffer
,RetainableByteBuffer.Mutable
- Enclosing class:
ArrayByteBufferPool.Tracking
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.Retainable
Retainable.ReferenceCounter, Retainable.Wrapper
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.RetainableByteBuffer
RetainableByteBuffer.Abstract, RetainableByteBuffer.DynamicCapacity, RetainableByteBuffer.EmptyRetainableByteBuffer, RetainableByteBuffer.FixedCapacity, RetainableByteBuffer.Mutable, RetainableByteBuffer.NonRetainableByteBuffer, RetainableByteBuffer.Pooled, RetainableByteBuffer.Wrapper
-
Field Summary
Fields inherited from interface org.eclipse.jetty.io.Retainable
NON_RETAINABLE
Fields inherited from interface org.eclipse.jetty.io.RetainableByteBuffer
EMPTY
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addExtraStringInfo
(StringBuilder builder) dump()
int
getSize()
boolean
release()
Releases this resource, potentially decrementing a reference count (if any).void
retain()
Retains this resource, potentially incrementing a reference count if there are resources that will be released.slice()
Get a slice of the buffer.slice
(long length) Get a partial slice of the buffer.Methods inherited from class org.eclipse.jetty.io.RetainableByteBuffer.FixedCapacity
add, add, addValueMarker, append, append, asMutable, capacity, clear, get, getByteBuffer, hasRemaining, isDirect, limit, put, put, put, putInt, putLong, putShort, remaining, space
Methods inherited from class org.eclipse.jetty.io.RetainableByteBuffer.Abstract
addStringInfo, addValueString, toDetailString, toString
Methods inherited from class org.eclipse.jetty.io.Retainable.Wrapper
canRetain, getRetained, getWrapped, isRetained
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.io.Retainable
canRetain, getRetained, isRetained
Methods inherited from interface org.eclipse.jetty.io.RetainableByteBuffer
appendTo, appendTo, copy, get, get, isEmpty, isFull, isMutable, maxSize, putTo, size, skip, take, take, takeByteArray, takeFrom, toDetailString, writeTo, writeTo
Methods inherited from interface org.eclipse.jetty.io.RetainableByteBuffer.Mutable
put
-
Method Details
-
getSize
public int getSize() -
getAcquireInstant
-
getAcquireStack
-
slice
Description copied from interface:RetainableByteBuffer
Get a slice of the buffer.- Returns:
- A sliced
RetainableByteBuffer
sharing this buffers data and reference count, but with independent position. The buffer isretained
by this call. - See Also:
-
slice
Description copied from interface:RetainableByteBuffer
Get a partial slice of the buffer. This is equivalent toRetainableByteBuffer.slice()
.RetainableByteBuffer.limit(long)
, but may be implemented more efficiently.- Parameters:
length
- The number of bytes to slice, which may beyond the limit and less than the capacity, in which case it will ensure some spare capacity in the slice.- Returns:
- A sliced
RetainableByteBuffer
sharing the firstlength
bytes of this buffers data and reference count, but with independent position. The buffer isretained
by this call.
-
retain
public void retain()Description copied from interface:Retainable
Retains this resource, potentially incrementing a reference count if there are resources that will be released.
- Specified by:
retain
in interfaceRetainable
- Overrides:
retain
in classRetainable.Wrapper
-
release
public boolean release()Description copied from interface:Retainable
Releases this resource, potentially decrementing a reference count (if any).
- Specified by:
release
in interfaceRetainable
- Overrides:
release
in classRetainable.Wrapper
- Returns:
true
when the reference count goes to zero or if there was no reference count,false
otherwise.
-
addExtraStringInfo
- Overrides:
addExtraStringInfo
in classRetainableByteBuffer.Abstract
-
dump
-