Package org.postgresql.util
Class LazyCleaner
java.lang.Object
org.postgresql.util.LazyCleaner
LazyCleaner is a utility class that allows to register objects for deferred cleanup.
Note: this is a driver-internal class
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
LazyCleaner.Cleanable<T extends Throwable>
static interface
LazyCleaner.CleaningAction<T extends Throwable>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LazyCleaner
Returns a default cleaner instance.int
boolean
<T extends Throwable>
LazyCleaner.Cleanable<T>register
(Object obj, LazyCleaner.CleaningAction<T> action)
-
Constructor Details
-
LazyCleaner
-
-
Method Details
-
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()
-