@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.Modifier and Type | Field and Description |
---|---|
private static org.apache.hbase.thirdparty.io.netty.util.ResourceLeakDetector<RefCnt> |
detector |
private org.apache.hbase.thirdparty.io.netty.util.ResourceLeakTracker<RefCnt> |
leak |
private ByteBuffAllocator.Recycler |
recycler |
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() |
private void |
maybeRecord() |
private void |
maybeRecord(Object hint) |
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) |
private static final org.apache.hbase.thirdparty.io.netty.util.ResourceLeakDetector<RefCnt> detector
private final ByteBuffAllocator.Recycler recycler
public RefCnt(ByteBuffAllocator.Recycler recycler)
public static RefCnt create(ByteBuffAllocator.Recycler recycler)
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 ByteBuffAllocator.Recycler getRecycler()
private void maybeRecord()
private void maybeRecord(Object hint)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.