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 voidrelease()Release ownership of thisReleasableLivenessManager, allowing any retainedLivenessReferents to cleanup if they no longer have outstanding references.final booleantryManage(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, waitMethods inherited from interface com.illumon.iris.db.util.liveness.LivenessManager
manage
-
Constructor Details
-
SingletonLivenessManager
public SingletonLivenessManager() -
SingletonLivenessManager
-
-
Method Details
-
tryManage
Description copied from interface:LivenessManagerAttempt to add the specified referent to this manager.- Specified by:
tryManagein interfaceLivenessManager- Parameters:
referent- The referent to add- Returns:
- Whether the referent was in fact added
-
release
public final void release()Description copied from interface:ReleasableLivenessManagerRelease ownership of thisReleasableLivenessManager, allowing any retainedLivenessReferents to cleanup if they no longer have outstanding references.- Specified by:
releasein interfaceReleasableLivenessManager
-