public interface Payload extends ReferenceCounted
| Modifier and Type | Method and Description |
|---|---|
ByteBuf |
data()
Returns the Payloads' data without slicing if possible.
|
default ByteBuffer |
getData() |
default String |
getDataUtf8() |
default ByteBuffer |
getMetadata() |
default String |
getMetadataUtf8() |
boolean |
hasMetadata()
Returns whether the payload has metadata, useful for tell if metadata is empty or not present.
|
ByteBuf |
metadata()
Returns the Payloads' metadata without slicing if possible.
|
Payload |
retain()
Increases the reference count by
1. |
Payload |
retain(int increment)
Increases the reference count by the specified
increment. |
ByteBuf |
sliceData()
Returns the Payload data.
|
ByteBuf |
sliceMetadata()
Returns a slice Payload metadata.
|
Payload |
touch()
Records the current access location of this object for debugging purposes.
|
Payload |
touch(Object hint)
Records the current access location of this object with an additional arbitrary information for
debugging purposes.
|
refCnt, release, releaseboolean hasMetadata()
ByteBuf sliceMetadata()
hasMetadata() to
differentiate null from "".ByteBuf sliceData()
ByteBuf data()
ByteBuf metadata()
Payload retain()
1.retain in interface ReferenceCountedPayload retain(int increment)
increment.retain in interface ReferenceCountedPayload touch()
ResourceLeakDetector. This method is a shortcut to touch(null).touch in interface ReferenceCountedPayload touch(Object hint)
ResourceLeakDetector.touch in interface ReferenceCounteddefault ByteBuffer getMetadata()
default ByteBuffer getData()
default String getMetadataUtf8()
default String getDataUtf8()