Package io.netty.buffer
Interface ByteBufHolder
-
- All Superinterfaces:
ReferenceCounted
- All Known Subinterfaces:
Attribute
,BulkStringRedisContent
,DnsRawRecord
,FileUpload
,FullBinaryMemcacheRequest
,FullBinaryMemcacheResponse
,FullHttpMessage
,FullHttpRequest
,FullHttpResponse
,FullMemcacheMessage
,Http2DataFrame
,Http2GoAwayFrame
,Http2UnknownFrame
,HttpContent
,HttpData
,LastBulkStringRedisContent
,LastHttpContent
,LastMemcacheContent
,LastSmtpContent
,LastStompContentSubframe
,MemcacheContent
,SmtpContent
,SpdyDataFrame
,SpdyUnknownFrame
,StompContentSubframe
,StompFrame
- All Known Implementing Classes:
AbstractDiskHttpData
,AbstractHttpData
,AbstractMemoryHttpData
,BinaryWebSocketFrame
,CloseWebSocketFrame
,ContinuationWebSocketFrame
,DatagramPacket
,DefaultBulkStringRedisContent
,DefaultByteBufHolder
,DefaultDnsRawRecord
,DefaultFullBinaryMemcacheRequest
,DefaultFullBinaryMemcacheResponse
,DefaultFullHttpRequest
,DefaultFullHttpResponse
,DefaultHttp2DataFrame
,DefaultHttp2GoAwayFrame
,DefaultHttp2UnknownFrame
,DefaultHttpContent
,DefaultLastBulkStringRedisContent
,DefaultLastHttpContent
,DefaultLastMemcacheContent
,DefaultLastSmtpContent
,DefaultLastStompContentSubframe
,DefaultMemcacheContent
,DefaultSmtpContent
,DefaultSpdyDataFrame
,DefaultSpdyUnknownFrame
,DefaultStompContentSubframe
,DefaultStompFrame
,DiskAttribute
,DiskFileUpload
,DomainDatagramPacket
,FullBulkStringRedisMessage
,HAProxySSLTLV
,HAProxyTLV
,MemoryAttribute
,MemoryFileUpload
,MixedAttribute
,MixedFileUpload
,MqttPublishMessage
,PemPrivateKey
,PemX509Certificate
,PingWebSocketFrame
,PongWebSocketFrame
,SctpMessage
,SegmentedDatagramPacket
,SegmentedDatagramPacket
,TextWebSocketFrame
,UdtMessage
,WebSocketFrame
public interface ByteBufHolder extends ReferenceCounted
A packet which is send or receive.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ByteBuf
content()
Return the data which is held by thisByteBufHolder
.ByteBufHolder
copy()
Creates a deep copy of thisByteBufHolder
.ByteBufHolder
duplicate()
Duplicates thisByteBufHolder
.ByteBufHolder
replace(ByteBuf content)
Returns a newByteBufHolder
which contains the specifiedcontent
.ByteBufHolder
retain()
Increases the reference count by1
.ByteBufHolder
retain(int increment)
Increases the reference count by the specifiedincrement
.ByteBufHolder
retainedDuplicate()
Duplicates thisByteBufHolder
.ByteBufHolder
touch()
Records the current access location of this object for debugging purposes.ByteBufHolder
touch(java.lang.Object hint)
Records the current access location of this object with an additional arbitrary information for debugging purposes.-
Methods inherited from interface io.netty.util.ReferenceCounted
refCnt, release, release
-
-
-
-
Method Detail
-
content
ByteBuf content()
Return the data which is held by thisByteBufHolder
.
-
copy
ByteBufHolder copy()
Creates a deep copy of thisByteBufHolder
.
-
duplicate
ByteBufHolder duplicate()
Duplicates thisByteBufHolder
. Be aware that this will not automatically callretain()
.
-
retainedDuplicate
ByteBufHolder retainedDuplicate()
Duplicates thisByteBufHolder
. This method returns a retained duplicate unlikeduplicate()
.- See Also:
ByteBuf.retainedDuplicate()
-
replace
ByteBufHolder replace(ByteBuf content)
Returns a newByteBufHolder
which contains the specifiedcontent
.
-
retain
ByteBufHolder retain()
Description copied from interface:ReferenceCounted
Increases the reference count by1
.- Specified by:
retain
in interfaceReferenceCounted
-
retain
ByteBufHolder retain(int increment)
Description copied from interface:ReferenceCounted
Increases the reference count by the specifiedincrement
.- Specified by:
retain
in interfaceReferenceCounted
-
touch
ByteBufHolder touch()
Description copied from interface:ReferenceCounted
Records the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector
. This method is a shortcut totouch(null)
.- Specified by:
touch
in interfaceReferenceCounted
-
touch
ByteBufHolder touch(java.lang.Object hint)
Description copied from interface:ReferenceCounted
Records the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector
.- Specified by:
touch
in interfaceReferenceCounted
-
-