Package org.frankframework.util
Class CleanerProvider
java.lang.Object
org.frankframework.util.CleanerProvider
Starts the singleton Cleaner thread of F!F, to clean a resource when it becomes phantom reachable.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
clean
(Cleaner.Cleanable cleanable) Execute the cleaning action, if it needs to be manually invoked before the object is out of scope, for instance from a close-method.static void
static Cleaner.Cleanable
Method to register a cleaning-action for a method.
-
Field Details
-
CLEANER
-
-
Constructor Details
-
CleanerProvider
public CleanerProvider()
-
-
Method Details
-
logLeakStatistics
public static void logLeakStatistics() -
register
Method to register a cleaning-action for a method.- Parameters:
obj
- Object for which the cleaning-action should be registeredcleaningAction
- Cleaning Action to register- Returns:
- ID of the cleaning action, which can be used to execute it.
-
clean
Execute the cleaning action, if it needs to be manually invoked before the object is out of scope, for instance from a close-method. This de-registers the cleaning action and marks it so that it is not counted as leaked.- Parameters:
cleanable
- Cleaning Action to execute.
-