类 ByteBufPair
java.lang.Object
io.netty.util.AbstractReferenceCounted
org.apache.pulsar.common.protocol.ByteBufPair
- 所有已实现的接口:
io.netty.util.ReferenceCounted
public final class ByteBufPair
extends io.netty.util.AbstractReferenceCounted
ByteBuf holder that contains 2 buffers.
-
嵌套类概要
嵌套类 -
字段概要
字段 -
方法概要
修饰符和类型方法说明static io.netty.buffer.ByteBufcoalesce(ByteBufPair pair) protected voidstatic ByteBufPairget(io.netty.buffer.ByteBuf b1, io.netty.buffer.ByteBuf b2) Get a newByteBufPairfrom the pool and assign 2 buffers to it.io.netty.buffer.ByteBufgetFirst()io.netty.buffer.ByteBufintio.netty.util.ReferenceCounted从类继承的方法 io.netty.util.AbstractReferenceCounted
refCnt, release, release, retain, retain, setRefCnt, touch
-
字段详细资料
-
ENCODER
-
COPYING_ENCODER
-
-
方法详细资料
-
get
Get a newByteBufPairfrom the pool and assign 2 buffers to it.The buffers b1 and b2 lifecycles are now managed by the ByteBufPair: when the
ByteBufPairis deallocated, b1 and b2 will be released as well.- 参数:
b1-b2-- 返回:
-
getFirst
public io.netty.buffer.ByteBuf getFirst() -
getSecond
public io.netty.buffer.ByteBuf getSecond() -
readableBytes
public int readableBytes() -
coalesce
- 返回:
- a single buffer with the content of both individual buffers
-
deallocate
protected void deallocate()- 指定者:
deallocate在类中io.netty.util.AbstractReferenceCounted
-
touch
-