public abstract class AbstractRefCounted extends Object implements RefCounted
closeInternal()
once it reaches
a 0 ref countConstructor and Description |
---|
AbstractRefCounted(String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
alreadyClosed() |
protected abstract void |
closeInternal() |
void |
decRef()
Decreases the refCount of this instance.
|
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 AbstractRefCounted(String name)
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 String getName()
protected abstract void closeInternal()
Copyright © 2009–2016. All rights reserved.