@InterfaceAudience.Private
public class RefCnt
extends org.apache.hbase.thirdparty.io.netty.util.AbstractReferenceCounted
ByteBuff
, if the
reference count become 0, it'll call ByteBuffAllocator.Recycler.free()
exactly once.Constructor and Description |
---|
RefCnt(ByteBuffAllocator.Recycler recycler) |
Modifier and Type | Method and Description |
---|---|
static RefCnt |
create()
Create an
RefCnt with an initial reference count = 1. |
static RefCnt |
create(ByteBuffAllocator.Recycler recycler) |
protected void |
deallocate() |
ByteBuffAllocator.Recycler |
getRecycler() |
boolean |
hasRecycler()
Returns true if this refCnt has a recycler.
|
boolean |
release() |
boolean |
release(int decrement) |
org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted |
retain() |
org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted |
retain(int increment) |
RefCnt |
touch() |
org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted |
touch(Object hint) |
public RefCnt(ByteBuffAllocator.Recycler recycler)
public static RefCnt create()
public static RefCnt create(ByteBuffAllocator.Recycler recycler)
public boolean hasRecycler()
public org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted retain()
retain
in interface org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted
retain
in class org.apache.hbase.thirdparty.io.netty.util.AbstractReferenceCounted
public org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted retain(int increment)
retain
in interface org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted
retain
in class org.apache.hbase.thirdparty.io.netty.util.AbstractReferenceCounted
public boolean release()
release
in interface org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted
release
in class org.apache.hbase.thirdparty.io.netty.util.AbstractReferenceCounted
public boolean release(int decrement)
release
in interface org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted
release
in class org.apache.hbase.thirdparty.io.netty.util.AbstractReferenceCounted
protected final void deallocate()
deallocate
in class org.apache.hbase.thirdparty.io.netty.util.AbstractReferenceCounted
public RefCnt touch()
touch
in interface org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted
touch
in class org.apache.hbase.thirdparty.io.netty.util.AbstractReferenceCounted
public final org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted touch(Object hint)
public ByteBuffAllocator.Recycler getRecycler()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.