public abstract class AbstractRefCounted extends java.lang.Object implements RefCounted
closeInternal()
once it reaches
a 0 ref countConstructor 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()
RefCounted
incRef
in interface RefCounted
RefCounted.decRef()
,
RefCounted.tryIncRef()
public final boolean tryIncRef()
RefCounted
tryIncRef
in interface RefCounted
RefCounted.decRef()
,
RefCounted.incRef()
public final void decRef()
RefCounted
decRef
in interface RefCounted
RefCounted.incRef()
protected void alreadyClosed()
public int refCount()
public java.lang.String getName()
protected abstract void closeInternal()