Class SingletonLivenessManager
java.lang.Object
com.illumon.iris.db.util.liveness.SingletonLivenessManager
- All Implemented Interfaces:
LivenessManager
,ReleasableLivenessManager
ReleasableLivenessManager
to manage exactly one object, passed at construction time or managed later.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
release()
Release ownership of thisReleasableLivenessManager
, allowing any retainedLivenessReferent
s to cleanup if they no longer have outstanding references.final boolean
tryManage
(LivenessReferent referent) Attempt to add the specified referent to this manager.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.util.liveness.LivenessManager
manage
-
Constructor Details
-
SingletonLivenessManager
public SingletonLivenessManager() -
SingletonLivenessManager
-
-
Method Details
-
tryManage
Description copied from interface:LivenessManager
Attempt to add the specified referent to this manager.- Specified by:
tryManage
in interfaceLivenessManager
- Parameters:
referent
- The referent to add- Returns:
- Whether the referent was in fact added
-
release
public final void release()Description copied from interface:ReleasableLivenessManager
Release ownership of thisReleasableLivenessManager
, allowing any retainedLivenessReferent
s to cleanup if they no longer have outstanding references.- Specified by:
release
in interfaceReleasableLivenessManager
-