Package org.apache.lucene.util
Class RefCount<T>
java.lang.Object
org.apache.lucene.util.RefCount<T>
Manages reference counting for a given object. Extensions can override
release()
to do custom logic when reference counting hits 0.-
Constructor Details
-
RefCount
-
-
Method Details
-
decRef
Decrements the reference counting of this object. When reference counting hits 0, callsrelease()
.- Throws:
IOException
-
get
-
getRefCount
public final int getRefCount()Returns the current reference count. -
incRef
public final void incRef()Increments the reference count. Calls to this method must be matched with calls todecRef()
.
-