V - the result type of method callpublic class CleanupCallable<V>
extends java.lang.Object
implements java.util.concurrent.Callable<V>
| Modifier and Type | Field and Description |
|---|---|
protected java.util.concurrent.Callable<V> |
callable
The callable executed normally.
|
protected ConsumingRunnable<V,java.lang.Throwable> |
cleanup
The cleanup runnable executed after the normal execution has terminated.
|
protected java.util.logging.Logger |
logger
The logger for logging exceptions from the cleanup runnable.
|
| Constructor and Description |
|---|
CleanupCallable(java.util.concurrent.Callable<V> callable,
ConsumingRunnable<V,java.lang.Throwable> cleanup,
java.util.logging.Logger logger)
Creates a new cleanup runnable executing the callable and the cleanup
runnable finally after the callable.
|
| Modifier and Type | Method and Description |
|---|---|
V |
call() |
protected final java.util.concurrent.Callable<V> callable
protected final ConsumingRunnable<V,java.lang.Throwable> cleanup
protected final java.util.logging.Logger logger
public CleanupCallable(java.util.concurrent.Callable<V> callable, ConsumingRunnable<V,java.lang.Throwable> cleanup, java.util.logging.Logger logger)
callable - The callable executed normally.cleanup - The cleanup runnable executed after the normal execution has
terminated.logger - The logger for logging exceptions from the cleanup.