|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.util.RefCount<T>
public class RefCount<T>
Manages reference counting for a given object. Extensions can override
release() to do custom logic when reference counting hits 0.
| Field Summary | |
|---|---|
protected T |
object
|
| Constructor Summary | |
|---|---|
RefCount(T object)
|
|
| Method Summary | |
|---|---|
void |
decRef()
Decrements the reference counting of this object. |
T |
get()
|
int |
getRefCount()
Returns the current reference count. |
void |
incRef()
Increments the reference count. |
protected void |
release()
Called when reference counting hits 0. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final T object
| Constructor Detail |
|---|
public RefCount(T object)
| Method Detail |
|---|
protected void release()
throws IOException
IOException
public final void decRef()
throws IOException
release().
IOExceptionpublic final T get()
public final int getRefCount()
public final void incRef()
decRef().
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||