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"LivenessReferent
instance.default void
Drop a previously-retained reference to this referent.default WeakReference<? extends LivenessReferent>
Get aWeakReference
to this referent.default boolean
If 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"LivenessReferent
instance. When implementing this, care should be taken to match lifecycle of theDelegatingLivenessReferent
instance with this instance, as the returnedLivenessReferent
behaves as a proxy forthis
.- Returns:
- a LivenessReferent to use to manage this object's liveness.
-
tryRetainReference
default boolean tryRetainReference()Description copied from interface:LivenessReferent
If this referent is "live", behave asLivenessReferent.retainReference()
and return true. Otherwise, returns false rather than throwing an exception.- Specified by:
tryRetainReference
in interfaceLivenessReferent
- Returns:
- True if this referent was retained, false otherwise
-
dropReference
default void dropReference()Description copied from interface:LivenessReferent
Drop a previously-retained reference to this referent.- Specified by:
dropReference
in interfaceLivenessReferent
-
getWeakReference
Description copied from interface:LivenessReferent
Get aWeakReference
to this referent. This may be cached, or newly created.- Specified by:
getWeakReference
in interfaceLivenessReferent
- Returns:
- A new or cached reference to this referent
-