public class SingletonLivenessManager extends Object implements ReleasableLivenessManager
ReleasableLivenessManager
to manage exactly one object, passed at construction time or managed later.Constructor and Description |
---|
SingletonLivenessManager() |
SingletonLivenessManager(LivenessReferent referent) |
Modifier and Type | Method and Description |
---|---|
void |
release()
Release ownership of this
ReleasableLivenessManager , allowing any retained LivenessReferent s to
cleanup if they no longer have outstanding references. |
boolean |
tryManage(LivenessReferent referent)
Attempt to add the specified referent to this manager.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
manage
public SingletonLivenessManager()
public SingletonLivenessManager(@NotNull LivenessReferent referent)
public final boolean tryManage(@NotNull LivenessReferent referent)
LivenessManager
tryManage
in interface LivenessManager
referent
- The referent to addpublic final void release()
ReleasableLivenessManager
ReleasableLivenessManager
, allowing any retained LivenessReferent
s to
cleanup if they no longer have outstanding references.release
in interface ReleasableLivenessManager