public abstract class AbstractRefCounted extends java.lang.Object implements RefCounted
closeInternal() once it reaches
a 0 ref count| Constructor and Description |
|---|
AbstractRefCounted(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
alreadyClosed() |
protected abstract void |
closeInternal() |
void |
decRef()
Decreases the refCount of this instance.
|
java.lang.String |
getName()
gets the name of this instance
|
void |
incRef()
Increments the refCount of this instance.
|
int |
refCount()
Returns the current reference count.
|
boolean |
tryIncRef()
Tries to increment the refCount of this instance.
|
public final void incRef()
RefCountedincRef in interface RefCountedRefCounted.decRef(),
RefCounted.tryIncRef()public final boolean tryIncRef()
RefCountedtryIncRef in interface RefCountedRefCounted.decRef(),
RefCounted.incRef()public final void decRef()
RefCounteddecRef in interface RefCountedRefCounted.incRef()protected void alreadyClosed()
public int refCount()
public java.lang.String getName()
protected abstract void closeInternal()