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 LivenessReferents.-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new scope, which must berelease()d in order to release any subsequently addedLivenessReferents.LivenessScope(boolean enforceStrongReachability) Construct a new scope, which must berelease()d in order to release any subsequently addedLivenessReferents. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidrelease()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 voidtransferTo(@NotNull LivenessManager other) Methods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessNode
getWeakReference, initializeTransientFieldsForLiveness, onReferenceCountAtZero, tryManage, tryUnmanage, tryUnmanageMethods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessReferent
destroy, dropReference, tryRetainReferenceMethods inherited from class io.deephaven.util.referencecounting.ReferenceCounted
append, decrementReferenceCount, forceReferenceCountToZero, getReferenceCountDebug, incrementReferenceCount, resetReferenceCount, toString, tryDecrementReferenceCount, tryIncrementReferenceCountMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.deephaven.engine.liveness.LivenessManager
manage, tryManage, tryUnmanage, tryUnmanage, unmanage, unmanageMethods 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 addedLivenessReferents. 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 addedLivenessReferents.- Parameters:
enforceStrongReachability- Whether thisLivenessScopeshould maintain strong references to itsLivenessManager.manage(LivenessReferent)ed referents
-
-
Method Details
-
transferTo
Transfer all retainedLivenessReferents from thisLivenessScopeto 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:
releasein interfaceReleasableLivenessManager
-