Package io.deephaven.engine.liveness
Class LivenessScope
java.lang.Object
io.deephaven.util.referencecounting.ReferenceCounted
io.deephaven.engine.liveness.ReferenceCountedLivenessReferent
io.deephaven.engine.liveness.ReferenceCountedLivenessNode
io.deephaven.engine.liveness.LivenessScope
- All Implemented Interfaces:
LogOutputAppendable
,LivenessManager
,LivenessNode
,LivenessReferent
,ReleasableLivenessManager
- Direct Known Subclasses:
AbstractScriptSession.ScriptSessionQueryScope
public class LivenessScope
extends ReferenceCountedLivenessNode
implements ReleasableLivenessManager
LivenessNode
implementation for providing external scope to one or more LivenessReferent
s.-
Constructor Summary
ConstructorDescriptionConstruct a new scope, which must berelease()
d in order to release any subsequently addedLivenessReferent
s.LivenessScope
(boolean enforceStrongReachability) Construct a new scope, which must berelease()
d in order to release any subsequently addedLivenessReferent
s. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
release()
Release all referents previously added to this scope in its capacity as aLivenessManager
, unless other references to this scope are retained in its capacity as aLivenessReferent
.final void
transferTo
(@NotNull LivenessManager other) Methods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessNode
getWeakReference, initializeTransientFieldsForLiveness, onReferenceCountAtZero, tryManage, tryUnmanage, tryUnmanage
Methods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessReferent
destroy, dropReference, tryRetainReference
Methods inherited from class io.deephaven.util.referencecounting.ReferenceCounted
append, decrementReferenceCount, forceReferenceCountToZero, getReferenceCountDebug, incrementReferenceCount, resetReferenceCount, toString, tryDecrementReferenceCount, tryIncrementReferenceCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.deephaven.engine.liveness.LivenessManager
manage, tryManage
Methods inherited from interface io.deephaven.engine.liveness.LivenessNode
unmanage, unmanage
Methods inherited from interface io.deephaven.engine.liveness.LivenessReferent
dropReference, getReferentDescription, retainReference, tryRetainReference
-
Constructor Details
-
LivenessScope
public LivenessScope()Construct a new scope, which must berelease()
d in order to release any subsequently addedLivenessReferent
s. Will only enforce weak reachability on itsLivenessManager.manage(LivenessReferent)
ed referents. -
LivenessScope
public LivenessScope(boolean enforceStrongReachability) Construct a new scope, which must berelease()
d in order to release any subsequently addedLivenessReferent
s.- Parameters:
enforceStrongReachability
- Whether thisLivenessScope
should maintain strong references to itsLivenessManager.manage(LivenessReferent)
ed referents
-
-
Method Details
-
transferTo
Transfer all retainedLivenessReferent
s from thisLivenessScope
to a compatibleLivenessManager
. Transfer support compatibility is implementation defined.- Parameters:
other
- The otherLivenessManager
-
release
public final void release()Release all referents previously added to this scope in its capacity as aLivenessManager
, unless other references to this scope are retained in its capacity as aLivenessReferent
.- Specified by:
release
in interfaceReleasableLivenessManager
-