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,Http3DataFrame,Http3UnknownFrame,HttpContent,HttpData,LastBulkStringRedisContent,LastHttpContent,LastMemcacheContent,LastSmtpContent,LastStompContentSubframe,MemcacheContent,QuicStreamFrame,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,DefaultHttp3DataFrame,DefaultHttp3UnknownFrame,DefaultHttpContent,DefaultLastBulkStringRedisContent,DefaultLastHttpContent,DefaultLastMemcacheContent,DefaultLastSmtpContent,DefaultLastStompContentSubframe,DefaultMemcacheContent,DefaultQuicStreamFrame,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 ByteBufcontent()Return the data which is held by thisByteBufHolder.ByteBufHoldercopy()Creates a deep copy of thisByteBufHolder.ByteBufHolderduplicate()Duplicates thisByteBufHolder.ByteBufHolderreplace(ByteBuf content)Returns a newByteBufHolderwhich contains the specifiedcontent.ByteBufHolderretain()Increases the reference count by1.ByteBufHolderretain(int increment)Increases the reference count by the specifiedincrement.ByteBufHolderretainedDuplicate()Duplicates thisByteBufHolder.ByteBufHoldertouch()Records the current access location of this object for debugging purposes.ByteBufHoldertouch(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 newByteBufHolderwhich contains the specifiedcontent.
-
retain
ByteBufHolder retain()
Description copied from interface:ReferenceCountedIncreases the reference count by1.- Specified by:
retainin interfaceReferenceCounted
-
retain
ByteBufHolder retain(int increment)
Description copied from interface:ReferenceCountedIncreases the reference count by the specifiedincrement.- Specified by:
retainin interfaceReferenceCounted
-
touch
ByteBufHolder touch()
Description copied from interface:ReferenceCountedRecords 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:
touchin interfaceReferenceCounted
-
touch
ByteBufHolder touch(java.lang.Object hint)
Description copied from interface:ReferenceCountedRecords 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:
touchin interfaceReferenceCounted
-
-