Add setRefCnt(int) method to AbstractReferenceCounted(ByteBuf)
- Fixes #1265
This commit is contained in:
parent
2600f46fd7
commit
5bfb408b7d
@ -56,6 +56,13 @@ public abstract class AbstractReferenceCounted implements ReferenceCounted {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An unsafe operation intended for use by a subclass that sets the reference count of the buffer directly
|
||||||
|
*/
|
||||||
|
protected final void setRefCnt(int refCnt) {
|
||||||
|
this.refCnt = refCnt;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ReferenceCounted retain() {
|
public ReferenceCounted retain() {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
@ -61,6 +61,13 @@ public abstract class AbstractReferenceCountedByteBuf extends AbstractByteBuf {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An unsafe operation intended for use by a subclass that sets the reference count of the buffer directly
|
||||||
|
*/
|
||||||
|
protected final void setRefCnt(int refCnt) {
|
||||||
|
this.refCnt = refCnt;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ByteBuf retain() {
|
public ByteBuf retain() {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user