Class LoggingFuture.IgnoredResultLogger
java.lang.Object
de.aristaflow.adept2.util.CleanupTask.AbstractCleanupTask<RuntimeException>
de.aristaflow.adept2.util.threading.LoggingFuture.IgnoredResultLogger
- All Implemented Interfaces:
CleanupTask<RuntimeException>
- Enclosing class:
- LoggingFuture<V>
protected static final class LoggingFuture.IgnoredResultLogger
extends CleanupTask.AbstractCleanupTask<RuntimeException>
This clean-up task logs the result of a future which no one retrieved. The result may be an
exception. If this is not logged, some important results/exceptions may be lost unnoticed. This
task will be ignored when the results of the future are retrieved (by explicitly calling
Since this is executed as post-mortem action for the corresponding
cleanup(boolean). Since this is executed as post-mortem action for the corresponding
LoggingFuture,
it needs relevant fields as copy.-
Nested Class Summary
Nested classes/interfaces inherited from interface de.aristaflow.adept2.util.CleanupTask
CleanupTask.AbstractCleanupTask<EX extends Exception>, CleanupTask.AtomicCloseTask, CleanupTask.CloseAndResetTask, CleanupTask.MutableCloseTask -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final RunnableFuture<?>LoggingFuture.futureprotected final booleanFields inherited from class de.aristaflow.adept2.util.CleanupTask.AbstractCleanupTask
descriptor, logger -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIgnoredResultLogger(LoggingFuture<?> obj) Creates new clean-up logic logging the result of the designated future as post-mortem action of theLoggingFuturein case its result has not been retrieved. -
Method Summary
Methods inherited from class de.aristaflow.adept2.util.CleanupTask.AbstractCleanupTask
getDescriptor
-
Field Details
-
future
LoggingFuture.future -
resultRelevant
protected final boolean resultRelevant
-
-
Constructor Details
-
IgnoredResultLogger
Creates new clean-up logic logging the result of the designated future as post-mortem action of theLoggingFuturein case its result has not been retrieved.- Parameters:
obj- TheLoggingFutureof which to log the unnoticed result after it has been garbage-collected.
-
-
Method Details
-
cleanup
Description copied from interface:CleanupTaskPerforms the actual clean-up. This method is only called byCleanupand must NOT be called directly!- Parameters:
explicit- Whether the clean-up was triggered explicitly viaCleanup.clean(). Otherwise it was triggered implicitly as a post-mortem action by the object becoming phantom reachable.- Throws:
RuntimeException
-