Package org.postgresql.util
Class LazyCleaner
- java.lang.Object
-
- org.postgresql.util.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
LazyCleaner.Cleanable<T extends java.lang.Throwable>
static interface
LazyCleaner.CleaningAction<T extends java.lang.Throwable>
-
Constructor Summary
Constructors Constructor Description LazyCleaner(java.time.Duration threadTtl, java.lang.String threadName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LazyCleaner
getInstance()
Returns a default cleaner instance.int
getWatchedCount()
boolean
isThreadRunning()
<T extends java.lang.Throwable>
LazyCleaner.Cleanable<T>register(java.lang.Object obj, LazyCleaner.CleaningAction<T> action)
-
-
-
Method Detail
-
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 java.lang.Throwable> LazyCleaner.Cleanable<T> register(java.lang.Object obj, LazyCleaner.CleaningAction<T> action)
-
getWatchedCount
public int getWatchedCount()
-
isThreadRunning
public boolean isThreadRunning()
-
-