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.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
clean
(int actionId) Execute cleaning action by ID.static void
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 int
Method to register a cleaning-action for a method.
-
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:
cleaningAction
- Cleaning Action to execute.
-
clean
public static void clean(int actionId) Execute cleaning action by ID.- Parameters:
actionId
- ID of the cleaning action.
-