public class FutureTaskWithResources<V> extends FutureTask<V>
AsyncFuture
, making it compatible with ExecutorPlus
.
Encapsulates a WithResources
; the call will instantiate the resources before executing,
and close them after executing but before completing the task.
Propagates exceptions to the uncaught exception handler.Awaitable.AbstractAwaitable, Awaitable.AsyncAwaitable, Awaitable.Defaults, Awaitable.SyncAwaitable
CANCELLED, UNCANCELLABLE, UNSET
Constructor and Description |
---|
FutureTaskWithResources(WithResources withResources,
java.util.concurrent.Callable<V> call) |
FutureTaskWithResources(WithResources withResources,
java.lang.Runnable task) |
callable, callable, callable, callable, description, run, tryFailure
await, awaitUntil, flatMap, map
addCallback, addCallback, addCallback, addCallback, addCallback, addCallback, addListener, addListener, addListener, addListeners, await, awaitThrowUncheckedOnInterrupt, awaitThrowUncheckedOnInterrupt, awaitUninterruptibly, awaitUninterruptibly, awaitUntilThrowUncheckedOnInterrupt, awaitUntilUninterruptibly, cancel, cause, flatMap, get, get, getNow, getWhenDone, isCancellable, isCancelled, isDone, isSuccess, isUncancellable, map, map, notifyExecutor, removeListener, removeListeners, setUncancellable, setUncancellableExclusive, toString, trySuccess
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addCallback, addCallback, addCallback, addCallback, addCallback, addCallback, addListener, addListener, addListener, addListeners, await, await, awaitThrowUncheckedOnInterrupt, awaitUninterruptibly, awaitUninterruptibly, flatMap, flatMap, map, map, notifyExecutor, removeListener, removeListeners, rethrowIfFailed, sync, syncThrowUncheckedOnInterrupt, syncUninterruptibly
await, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isSuccess
await, awaitThrowUncheckedOnInterrupt, awaitUninterruptibly, awaitUntil, awaitUntilThrowUncheckedOnInterrupt, awaitUntilUninterruptibly
public FutureTaskWithResources(WithResources withResources, java.util.concurrent.Callable<V> call)
public FutureTaskWithResources(WithResources withResources, java.lang.Runnable task)
Copyright © 2009-2022 The Apache Software Foundation