public class EmptyPayload extends Object implements Payload
Modifier and Type | Field and Description |
---|---|
static EmptyPayload |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
ByteBuf |
data()
Returns the Payloads' data without slicing if possible.
|
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.
|
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 a slice 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, wait
getData, getDataUtf8, getMetadata, getMetadataUtf8
public static final EmptyPayload INSTANCE
public boolean hasMetadata()
Payload
hasMetadata
in interface Payload
public ByteBuf sliceMetadata()
Payload
Payload.hasMetadata()
to
differentiate null from "".sliceMetadata
in interface Payload
public ByteBuf sliceData()
Payload
public ByteBuf data()
Payload
public ByteBuf metadata()
Payload
public int refCnt()
refCnt
in interface ReferenceCounted
public EmptyPayload retain()
Payload
1
.retain
in interface ReferenceCounted
retain
in interface Payload
public EmptyPayload retain(int increment)
Payload
increment
.retain
in interface ReferenceCounted
retain
in interface Payload
public EmptyPayload touch()
Payload
ResourceLeakDetector
. This method is a shortcut to touch(null)
.touch
in interface ReferenceCounted
touch
in interface Payload
public EmptyPayload touch(Object hint)
Payload
ResourceLeakDetector
.touch
in interface ReferenceCounted
touch
in interface Payload
public boolean release()
release
in interface ReferenceCounted
public boolean release(int decrement)
release
in interface ReferenceCounted