Class LazyCleaner

java.lang.Object
org.postgresql.util.LazyCleaner

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

Note: this is a driver-internal class

  • Constructor Details

    • LazyCleaner

      public LazyCleaner(Duration threadTtl, String threadName)
  • Method Details

    • getInstance

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

      Note: this is driver-internal API.

      Returns:
      the instance of LazyCleaner
    • register

      public <T extends Throwable> LazyCleaner.Cleanable<T> register(Object obj, LazyCleaner.CleaningAction<T> action)
    • getWatchedCount

      public int getWatchedCount()
    • isThreadRunning

      public boolean isThreadRunning()