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
|
||||
public ReferenceCounted retain() {
|
||||
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
|
||||
public ByteBuf retain() {
|
||||
for (;;) {
|
||||
|
Loading…
Reference in New Issue
Block a user