Package org.eclipse.jetty.io.internal
Class ByteBufferChunk.ReleasedByConsumer
java.lang.Object
org.eclipse.jetty.io.internal.ByteBufferChunk
org.eclipse.jetty.io.internal.ByteBufferChunk.WithReferenceCount
org.eclipse.jetty.io.internal.ByteBufferChunk.ReleasedByConsumer
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.io.internal.ByteBufferChunk
ByteBufferChunk.ReleasedByConsumer, ByteBufferChunk.ReleasedByRunnable, ByteBufferChunk.WithReferenceCount, ByteBufferChunk.WithRetainableNested classes/interfaces inherited from interface org.eclipse.jetty.io.Content.Chunk
Content.Chunk.ProcessorNested classes/interfaces inherited from interface org.eclipse.jetty.io.Retainable
Retainable.ReferenceCounter, Retainable.Wrapper -
Field Summary
Fields inherited from interface org.eclipse.jetty.io.Content.Chunk
EMPTY, EOF -
Constructor Summary
ConstructorsConstructorDescriptionReleasedByConsumer(ByteBuffer byteBuffer, boolean last, Consumer<ByteBuffer> releaser) -
Method Summary
Modifier and TypeMethodDescriptionbooleanrelease()Releases this resource, potentially decrementing a reference count (if any).Methods inherited from class org.eclipse.jetty.io.internal.ByteBufferChunk.WithReferenceCount
canRetain, retain, toStringMethods inherited from class org.eclipse.jetty.io.internal.ByteBufferChunk
getByteBuffer, isLastMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.io.Content.Chunk
asReadOnly, get, getFailure, hasRemaining, remaining, skip
-
Constructor Details
-
ReleasedByConsumer
-
-
Method Details
-
release
public boolean release()Description copied from interface:RetainableReleases this resource, potentially decrementing a reference count (if any).
- Specified by:
releasein interfaceRetainable- Overrides:
releasein classByteBufferChunk.WithReferenceCount- Returns:
truewhen the reference count goes to zero or if there was no reference count,falseotherwise.
-