Overview
Package
Class
Use
Tree
Deprecated
Index
All Classes
Help
Prev Class
Next Class
VUtils – Release 1
Class org.violetlib.util.CleaningService
Inherited members: ShowHide
Deprecated: ShowHide
org.violetlib.util

Class CleaningService

  • Object
    • CleaningService
  • public final class CleaningService extends Object
    A wrapper around the JDK 8 and JDK 9+ Cleaners.
    • Nested Classes 
      Modifier and Type Class and Description
      Ordinary member indicator Cleanable Reveal DetailHide Detail
      static interface Cleanable
      This interface provides the ability to explicitly run a registered cleaning action.
      static interface Cleanable
      This interface provides the ability to explicitly run a registered cleaning action.
    • Static Methods 
      Modifier and Type Static Method and Description
      Ordinary member indicator create Reveal DetailHide Detail
      static CleaningService.Cleanable create(Object o, Runnable action)
      Register an object and a cleaning action to run when the object becomes phantom reachable.
      public static CleaningService.Cleanable create(Object o, Runnable action) throws UnsupportedOperationException
      Register an object and a cleaning action to run when the object becomes phantom reachable.
      Parameters:
      o - The object to monitor.
      action - The action to run when o becomes phantom reachable.
      Returns:
      an object that can be used to explicitly run the cleaning action. If the cleaning action is run explicitly, then it is not run again after the object becomes phantom reachable.
      Throws:
      UnsupportedOperationException - if this service is not supported.
      • Methods inherited from class Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait