public abstract class AbstractReferenceCountedByteBuf extends AbstractByteBuf
Modifier | Constructor and Description |
---|---|
protected |
AbstractReferenceCountedByteBuf(int maxCapacity) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
deallocate()
一次调用
refCnt() 等于0。
|
int |
refCnt()
返回此对象的引用计数。
|
boolean |
release()
通过减小引用计数
1 并且如果所述引用计数达到在将释放该对象
0 。
|
boolean |
release(int decrement)
减小由指定的引用计数
decrement 并且如果所述引用计数达到在将释放该对象
0 。
|
ByteBuf |
retain()
将引用计数增加
1 。
|
ByteBuf |
retain(int increment)
将参考计数增加指定的
increment 。
|
protected void |
setRefCnt(int refCnt)
一个不安全的操作,旨在供直接设置缓冲区引用计数的子类使用
|
ByteBuf |
touch()
记录此对象的当前访问位置以进行调试。
|
ByteBuf |
touch(java.lang.Object hint)
记录此对象的当前访问位置,并附加一些用于调试的任意信息。
|
_getByte, _getInt, _getIntLE, _getLong, _getLongLE, _getShort, _getShortLE, _getUnsignedMedium, _getUnsignedMediumLE, _setByte, _setInt, _setIntLE, _setLong, _setLongLE, _setMedium, _setMediumLE, _setShort, _setShortLE, adjustMarkers, asReadOnly, bytesBefore, bytesBefore, bytesBefore, checkDstIndex, checkIndex, checkIndex, checkNewCapacity, checkReadableBytes, checkSrcIndex, clear, compareTo, copy, discardReadBytes, discardSomeReadBytes, duplicate, ensureAccessible, ensureWritable, ensureWritable, equals, forEachByte, forEachByte, forEachByteDesc, forEachByteDesc, getBoolean, getByte, getBytes, getBytes, getBytes, getChar, getCharSequence, getDouble, getFloat, getInt, getIntLE, getLong, getLongLE, getMedium, getMediumLE, getShort, getShortLE, getUnsignedByte, getUnsignedInt, getUnsignedIntLE, getUnsignedMedium, getUnsignedMediumLE, getUnsignedShort, getUnsignedShortLE, hashCode, indexOf, isReadable, isReadable, isReadOnly, isWritable, isWritable, markReaderIndex, markWriterIndex, maxCapacity, maxCapacity, maxWritableBytes, newSwappedByteBuf, nioBuffer, nioBuffers, order, readableBytes, readBoolean, readByte, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readChar, readCharSequence, readDouble, readerIndex, readerIndex, readFloat, readInt, readIntLE, readLong, readLongLE, readMedium, readMediumLE, readRetainedSlice, readShort, readShortLE, readSlice, readUnsignedByte, readUnsignedInt, readUnsignedIntLE, readUnsignedMedium, readUnsignedMediumLE, readUnsignedShort, readUnsignedShortLE, resetReaderIndex, resetWriterIndex, retainedDuplicate, retainedSlice, retainedSlice, setBoolean, setByte, setBytes, setBytes, setBytes, setChar, setCharSequence, setDouble, setFloat, setIndex, setInt, setIntLE, setLong, setLongLE, setMedium, setMediumLE, setShort, setShortLE, setZero, skipBytes, slice, slice, toString, toString, toString, writableBytes, writeBoolean, writeByte, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeChar, writeCharSequence, writeDouble, writeFloat, writeInt, writeIntLE, writeLong, writeLongLE, writeMedium, writeMediumLE, writerIndex, writerIndex, writeShort, writeShortLE, writeZero
alloc, array, arrayOffset, capacity, capacity, copy, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getDoubleLE, getFloatLE, hasArray, hasMemoryAddress, internalNioBuffer, isDirect, memoryAddress, nioBuffer, nioBufferCount, nioBuffers, order, readDoubleLE, readFloatLE, setBytes, setBytes, setBytes, setBytes, setBytes, setBytes, setDoubleLE, setFloatLE, unwrap, writeDoubleLE, writeFloatLE
public int refCnt()
ReferenceCounted
复制的描述
0
,则表示该对象已被释放。
protected final void setRefCnt(int refCnt)
public ByteBuf retain()
ReferenceCounted
复制的描述
1
。
retain
在界面
ReferenceCounted
retain
在课堂
ByteBuf
public ByteBuf retain(int increment)
ReferenceCounted
increment
。
retain
在界面
ReferenceCounted
retain
ByteBuf
public ByteBuf touch()
ReferenceCounted
复制的描述
touch
在界面
ReferenceCounted
touch
ByteBuf
public ByteBuf touch(java.lang.Object hint)
ReferenceCounted
复制的描述
ResourceLeakDetector
提供给您。
touch
在界面
ReferenceCounted
touch
在课堂
ByteBuf
public boolean release()
ReferenceCounted
复制的描述
1
并且如果所述引用计数达到在将释放该对象
0
。
true
当且仅当引用计数变为
0
且此对象已被释放
public boolean release(int decrement)
ReferenceCounted
decrement
并且如果所述引用计数达到在将释放该对象
0
。
true
当且仅当引用计数变为
0
且此对象已被释放
protected abstract void deallocate()
refCnt()
等于0。
Copyright © 2008–2018 The Netty Project. All rights reserved.