Class LazyCleaner


  • public class LazyCleaner
    extends java.lang.Object
    LazyCleaner is a utility class that allows to register objects for deferred cleanup.

    Note: this is a driver-internal class

    • Field Detail

      • LOGGER

        private static final java.util.logging.Logger LOGGER
      • queue

        private final java.lang.ref.ReferenceQueue<java.lang.Object> queue
      • threadTtl

        private final long threadTtl
      • threadFactory

        private final java.util.concurrent.ThreadFactory threadFactory
      • threadRunning

        private boolean threadRunning
      • watchedCount

        private int watchedCount
    • Constructor Detail

      • LazyCleaner

        public LazyCleaner​(java.time.Duration threadTtl,
                           java.lang.String threadName)
      • LazyCleaner

        private LazyCleaner​(java.time.Duration threadTtl,
                            java.util.concurrent.ThreadFactory threadFactory)
    • Method Detail

      • getInstance

        public static LazyCleaner getInstance()
        Returns a default cleaner instance.

        Note: this is driver-internal API.

        Returns:
        the instance of LazyCleaner
      • getWatchedCount

        public int getWatchedCount()
      • isThreadRunning

        public boolean isThreadRunning()
      • checkEmpty

        private boolean checkEmpty()
      • startThread

        private boolean startThread()