Class ObjectCleaner

java.lang.Object
io.netty.util.internal.ObjectCleaner

@Deprecated public final class ObjectCleaner extends Object
Deprecated.
The object cleaner is deprecated for removal.
Allows a way to register some Runnable that will executed once there are no references to an Object anymore.
  • Field Details

    • REFERENCE_QUEUE_POLL_TIMEOUT_MS

      private static final int REFERENCE_QUEUE_POLL_TIMEOUT_MS
      Deprecated.
    • CLEANER_THREAD_NAME

      static final String CLEANER_THREAD_NAME
      Deprecated.
    • LIVE_SET

      private static final Set<ObjectCleaner.AutomaticCleanerReference> LIVE_SET
      Deprecated.
    • REFERENCE_QUEUE

      private static final ReferenceQueue<Object> REFERENCE_QUEUE
      Deprecated.
    • CLEANER_RUNNING

      private static final AtomicBoolean CLEANER_RUNNING
      Deprecated.
    • CLEANER_TASK

      private static final Runnable CLEANER_TASK
      Deprecated.
  • Constructor Details

    • ObjectCleaner

      private ObjectCleaner()
      Deprecated.
  • Method Details

    • register

      public static void register(Object object, Runnable cleanupTask)
      Deprecated.
      Register the given Object for which the Runnable will be executed once there are no references to the object anymore. This should only be used if there are no other ways to execute some cleanup once the Object is not reachable anymore because it is not a cheap way to handle the cleanup.
    • getLiveSetCount

      public static int getLiveSetCount()
      Deprecated.