Enum Class CleanupReferenceProcessorInstance

java.lang.Object
java.lang.Enum<CleanupReferenceProcessorInstance>
io.deephaven.engine.util.reference.CleanupReferenceProcessorInstance
All Implemented Interfaces:
Serializable, Comparable<CleanupReferenceProcessorInstance>, java.lang.constant.Constable

public enum CleanupReferenceProcessorInstance extends Enum<CleanupReferenceProcessorInstance>
Dedicated ReferenceQueue suppliers for various engine purposes.
  • Enum Constant Details

  • Method Details

    • values

      public static CleanupReferenceProcessorInstance[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CleanupReferenceProcessorInstance valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getReferenceQueue

      public final <RT> ReferenceQueue<RT> getReferenceQueue()
    • registerPhantom

      public final <T> CleanupReference<T> registerPhantom(@NotNull T referent, @NotNull @NotNull Runnable action)
      Registers a referent and a cleaning action to run when the referent becomes phantom reachable. The returned CleanupReference is retained by this processor, ensuring it will not be garbage-collected before cleanup occurs.
      Parameters:
      referent - the object to monitor
      action - a Runnable to invoke when the referent becomes phantom reachable; must not hold a strong reference to the referent
      Returns:
      a cleanup reference instance
      See Also:
    • resetAllForUnitTests

      @TestUseOnly public static void resetAllForUnitTests()