Package com.tailf.conf
Class ConfCleaner
Object
com.tailf.conf.ConfCleaner
ConfCleaner manages a set of object references and corresponding
cleaning actions.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Cleaner.Cleanable
register
(Object obj, AutoCloseable closeable, AutoCloseable... closeables) Registers an auto closeable object that will be closed when the object becomes phantom reachable.static Cleaner.Cleanable
Registers an object and a cleaning action to run when the object becomes phantom reachable.
-
Field Details
-
CLEANER
-
-
Method Details
-
register
public static Cleaner.Cleanable register(Object obj, AutoCloseable closeable, AutoCloseable... closeables) Registers an auto closeable object that will be closed when the object becomes phantom reachable.- Parameters:
obj
- the object to monitor- Returns:
- a Cleanable instance
-
register
Registers an object and a cleaning action to run when the object becomes phantom reachable.- Parameters:
obj
- the object to monitor- Returns:
- a Cleanable instance
-