Interface DelegatingLivenessReferent

All Superinterfaces:
LivenessReferent
All Known Subinterfaces:
DelegatingLivenessNode
All Known Implementing Classes:
AbstractTableLocation, FigureWidget, NonexistentTableLocation, ParquetTableLocation, PythonTableDataService.TableLocationImpl, RegionedColumnSourceManager

public interface DelegatingLivenessReferent extends LivenessReferent
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 Details

    • asLivenessReferent

      LivenessReferent asLivenessReferent()
      Returns the "real" LivenessReferent instance. When implementing this, care should be taken to match lifecycle of the DelegatingLivenessReferent instance with this instance, as the returned LivenessReferent behaves as a proxy for this.
      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 as LivenessReferent.retainReference() and return true. Otherwise, returns false rather than throwing an exception.
      Specified by:
      tryRetainReference in interface LivenessReferent
      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 interface LivenessReferent
    • getWeakReference

      default WeakReference<? extends LivenessReferent> getWeakReference()
      Description copied from interface: LivenessReferent
      Get a WeakReference to this referent. This may be cached, or newly created.
      Specified by:
      getWeakReference in interface LivenessReferent
      Returns:
      A new or cached reference to this referent