public class EmptyPayload extends Object implements Payload
| Modifier and Type | Field and Description |
|---|---|
static EmptyPayload |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasMetadata()
Returns whether the payload has metadata, useful for tell if metadata is empty or not present.
|
int |
refCnt() |
boolean |
release() |
boolean |
release(int decrement) |
EmptyPayload |
retain()
Increases the reference count by
1. |
EmptyPayload |
retain(int increment)
Increases the reference count by the specified
increment. |
ByteBuf |
sliceData()
Returns the Payload data.
|
ByteBuf |
sliceMetadata()
Returns the Payload metadata.
|
EmptyPayload |
touch()
Records the current access location of this object for debugging purposes.
|
EmptyPayload |
touch(Object hint)
Records the current access location of this object with an additional arbitrary information for
debugging purposes.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetData, getDataUtf8, getMetadata, getMetadataUtf8public static final EmptyPayload INSTANCE
public boolean hasMetadata()
PayloadhasMetadata in interface Payloadpublic ByteBuf sliceMetadata()
PayloadPayload.hasMetadata() to differentiate
null from "".sliceMetadata in interface Payloadpublic ByteBuf sliceData()
Payloadpublic int refCnt()
refCnt in interface ReferenceCountedpublic EmptyPayload retain()
Payload1.retain in interface ReferenceCountedretain in interface Payloadpublic EmptyPayload retain(int increment)
Payloadincrement.retain in interface ReferenceCountedretain in interface Payloadpublic EmptyPayload touch()
PayloadResourceLeakDetector. This method is a shortcut to touch(null).touch in interface ReferenceCountedtouch in interface Payloadpublic EmptyPayload touch(Object hint)
PayloadResourceLeakDetector.touch in interface ReferenceCountedtouch in interface Payloadpublic boolean release()
release in interface ReferenceCountedpublic boolean release(int decrement)
release in interface ReferenceCounted