Package io.deephaven.engine.liveness
Interface DelegatingLivenessReferent
- All Superinterfaces:
LivenessReferent
- All Known Subinterfaces:
DelegatingLivenessNode
- All Known Implementing Classes:
AbstractTableLocation,FigureWidget,NonexistentTableLocation,ParquetTableLocation,PythonTableDataService.TableLocationImpl,RegionedColumnSourceManager
Indicates that this class implements LivenessReferent via a member rather than implementing it directly. The real
LivenessReferent is exposed via
asLivenessReferent(), all other methods delegate to this instance.-
Method Summary
Modifier and TypeMethodDescriptionReturns the "real"LivenessReferentinstance.default voidDrop a previously-retained reference to this referent.default WeakReference<? extends LivenessReferent>Get aWeakReferenceto this referent.default booleanIf this referent is "live", behave asLivenessReferent.retainReference()and return true.Methods inherited from interface io.deephaven.engine.liveness.LivenessReferent
getReferentDescription, retainReference
-
Method Details
-
asLivenessReferent
LivenessReferent asLivenessReferent()Returns the "real"LivenessReferentinstance. When implementing this, care should be taken to match lifecycle of theDelegatingLivenessReferentinstance with this instance, as the returnedLivenessReferentbehaves as a proxy forthis.- Returns:
- a LivenessReferent to use to manage this object's liveness.
-
tryRetainReference
default boolean tryRetainReference()Description copied from interface:LivenessReferentIf this referent is "live", behave asLivenessReferent.retainReference()and return true. Otherwise, returns false rather than throwing an exception.- Specified by:
tryRetainReferencein interfaceLivenessReferent- Returns:
- True if this referent was retained, false otherwise
-
dropReference
default void dropReference()Description copied from interface:LivenessReferentDrop a previously-retained reference to this referent.- Specified by:
dropReferencein interfaceLivenessReferent
-
getWeakReference
Description copied from interface:LivenessReferentGet aWeakReferenceto this referent. This may be cached, or newly created.- Specified by:
getWeakReferencein interfaceLivenessReferent- Returns:
- A new or cached reference to this referent
-