ByteBuf implementations that count references.
| Modifier and Type | Field and Description |
|---|---|
| private static final AtomicIntegerFieldUpdater | |
| private volatile int | |
| private static final long | |
| private static final ReferenceCountUpdater |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract void | |
| private boolean | |
| pack-priv boolean | isAccessible()
Overrides io. AbstractByteBuf#ensureAccessible() to try to guard
against using the buffer after it was released (best-effort).
|
| public int | refCnt()
Implements io. |
| public boolean | release()
Implements io. 1 and deallocates this object if the reference count reaches at
0.
|
| public boolean | release(int decrement)
Implements io. decrement and deallocates this object if the reference
count reaches at 0.
|
| protected final void | resetRefCnt()
An unsafe operation intended for use by a subclass that resets the reference count of the buffer to 1 |
| public ByteBuf | retain()
Implements abstract io. Implements io. 1.
|
| public ByteBuf | retain(int increment)
Implements abstract io. Implements io. increment.
|
| protected final void | setRefCnt(int refCnt)
An unsafe operation intended for use by a subclass that sets the reference count of the buffer directly |
| public ByteBuf | touch()
Implements abstract io. Implements io. |
| public ByteBuf | touch(Object hint)
Implements abstract io. Implements io. |
| AIF_UPDATER | back to summary |
|---|---|
| private static final AtomicIntegerFieldUpdater<AbstractReferenceCountedByteBuf> AIF_UPDATER | |
| refCnt | back to summary |
|---|---|
private volatile int refCnt
| |
| REFCNT_FIELD_OFFSET | back to summary |
|---|---|
| private static final long REFCNT_FIELD_OFFSET | |
| updater | back to summary |
|---|---|
| private static final ReferenceCountUpdater<AbstractReferenceCountedByteBuf> updater | |
| AbstractReferenceCountedByteBuf | back to summary |
|---|---|
| protected AbstractReferenceCountedByteBuf(int maxCapacity) | |
| deallocate | back to summary |
|---|---|
| protected abstract void deallocate() Called once | |
| handleRelease | back to summary |
|---|---|
| private boolean handleRelease(boolean result) | |
| isAccessible | back to summary |
|---|---|
| pack-priv boolean isAccessible() Overrides io. Doc from io. Used internally by
| |
| refCnt | back to summary |
|---|---|
| public int refCnt() Implements io. Doc from io. Returns the reference count of this object. If
| |
| release | back to summary |
|---|---|
| public boolean release() Implements io. Doc from io. Decreases the reference count by
| |
| release | back to summary |
|---|---|
| public boolean release(int decrement) Implements io. Doc from io. Decreases the reference count by the specified
| |
| resetRefCnt | back to summary |
|---|---|
| protected final void resetRefCnt() An unsafe operation intended for use by a subclass that resets the reference count of the buffer to 1 | |
| retain | back to summary |
|---|---|
| public ByteBuf retain() Implements abstract io. Implements io. Doc from io. Increases the reference count by
| |
| retain | back to summary |
|---|---|
| public ByteBuf retain(int increment) Implements abstract io. Implements io. Doc from io. Increases the reference count by the specified
| |
| setRefCnt | back to summary |
|---|---|
| protected final void setRefCnt(int refCnt) An unsafe operation intended for use by a subclass that sets the reference count of the buffer directly | |
| touch | back to summary |
|---|---|
| public ByteBuf touch() Implements abstract io. Implements io. Doc from io. 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
via
| |
| touch | back to summary |
|---|---|
| public ByteBuf touch(Object hint) Implements abstract io. Implements io. Doc from io. 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 via
| |