Module org.eclipse.jetty.io
Package org.eclipse.jetty.io
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.WrapperNested classes/interfaces inherited from interface org.eclipse.jetty.io.RetainableByteBuffer
RetainableByteBuffer.Abstract, RetainableByteBuffer.DynamicCapacity, RetainableByteBuffer.FixedCapacity, RetainableByteBuffer.Mutable, RetainableByteBuffer.NonRetainableByteBuffer, RetainableByteBuffer.Pooled, RetainableByteBuffer.Wrapper -
Field Summary
Fields inherited from interface org.eclipse.jetty.io.Retainable
NON_RETAINABLEFields inherited from interface org.eclipse.jetty.io.RetainableByteBuffer
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddExtraStringInfo(StringBuilder builder) dump()intgetSize()booleanrelease()Releases this resource, potentially decrementing a reference count (if any).voidretain()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, remainingMethods inherited from class org.eclipse.jetty.io.RetainableByteBuffer.Abstract
addStringInfo, addValueString, toDetailString, toStringMethods inherited from class org.eclipse.jetty.io.Retainable.Wrapper
canRetain, getRetained, getWrapped, isRetainedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.io.Retainable
canRetain, getRetained, isRetainedMethods inherited from interface org.eclipse.jetty.io.RetainableByteBuffer
appendTo, appendTo, copy, get, get, isEmpty, isFull, isMutable, maxSize, putTo, size, skip, space, take, take, takeByteArray, takeFrom, toDetailString, writeTo, writeToMethods inherited from interface org.eclipse.jetty.io.RetainableByteBuffer.Mutable
put
-
Method Details
-
getSize
public int getSize() -
getAcquireInstant
-
getAcquireStack
-
slice
Description copied from interface:RetainableByteBufferGet a slice of the buffer.- Returns:
- A sliced
RetainableByteBuffersharing this buffers data and reference count, but with independent position. The buffer isretainedby this call. - See Also:
-
slice
Description copied from interface:RetainableByteBufferGet 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
RetainableByteBuffersharing the firstlengthbytes of this buffers data and reference count, but with independent position. The buffer isretainedby this call.
-
retain
public void retain()Description copied from interface:RetainableRetains this resource, potentially incrementing a reference count if there are resources that will be released.
- Specified by:
retainin interfaceRetainable- Overrides:
retainin classRetainable.Wrapper
-
release
public boolean release()Description copied from interface:RetainableReleases this resource, potentially decrementing a reference count (if any).
- Specified by:
releasein interfaceRetainable- Overrides:
releasein classRetainable.Wrapper- Returns:
truewhen the reference count goes to zero or if there was no reference count,falseotherwise.
-
addExtraStringInfo
- Overrides:
addExtraStringInfoin classRetainableByteBuffer.Abstract
-
dump
-