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
Dedicated
ReferenceQueue suppliers for various engine purposes.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionfinal <RT> ReferenceQueue<RT> final <T> CleanupReference<T> registerPhantom(T referent, @NotNull Runnable action) Registers areferentand a cleaningactionto run when thereferentbecomes phantom reachable.static voidReturns the enum constant of this class with the specified name.static CleanupReferenceProcessorInstance[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LIVENESS
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getReferenceQueue
-
registerPhantom
public final <T> CleanupReference<T> registerPhantom(@NotNull T referent, @NotNull @NotNull Runnable action) Registers areferentand a cleaningactionto run when thereferentbecomes phantom reachable. The returnedCleanupReferenceis retained by this processor, ensuring it will not be garbage-collected before cleanup occurs.- Parameters:
referent- the object to monitoraction- aRunnableto invoke when the referent becomes phantom reachable; must not hold a strong reference to the referent- Returns:
- a cleanup reference instance
- See Also:
-
resetAllForUnitTests
-