Package io.deephaven.engine.liveness
Class SingletonLivenessManager
java.lang.Object
io.deephaven.engine.liveness.SingletonLivenessManager
- All Implemented Interfaces:
LivenessManager
,ReleasableLivenessManager
- Direct Known Subclasses:
ArrowFlightUtil.DoExchangeMarshaller
ReleasableLivenessManager
to manage exactly one object, passed at construction time or managed later.-
Constructor Summary
-
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
(@NotNull LivenessReferent referent) Attempt to addreferent
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 io.deephaven.engine.liveness.LivenessManager
manage
-
Constructor Details
-
SingletonLivenessManager
public SingletonLivenessManager() -
SingletonLivenessManager
-
-
Method Details
-
tryManage
Description copied from interface:LivenessManager
Attempt to addreferent
to this manager. Will succeed ifreferent
is live and if this manager is not aLivenessReferent
or is live.- 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
-