Package org.postgresql.util

# 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

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `LazyCleaner.Cleanable<T extends Throwable>`
  `static interface`
  `LazyCleaner.CleaningAction<T extends Throwable>`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LazyCleaner(Duration threadTtl, String threadName)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static LazyCleaner`
  `getInstance()`
  Returns a default cleaner instance.
  `int`
  `getWatchedCount()`
  `boolean`
  `isThreadRunning()`
  `<T extends Throwable>
  LazyCleaner.Cleanable<T>`
  `register(Object obj, LazyCleaner.CleaningAction<T> action)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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()