Package org.apache.cassandra.concurrent
Class FutureTaskWithResources<V>
- java.lang.Object
-
- org.apache.cassandra.utils.concurrent.AbstractFuture<V>
-
- org.apache.cassandra.utils.concurrent.AsyncFuture<V>
-
- org.apache.cassandra.concurrent.FutureTask<V>
-
- org.apache.cassandra.concurrent.FutureTaskWithResources<V>
-
- All Implemented Interfaces:
com.google.common.util.concurrent.ListenableFuture<V>
,io.netty.util.concurrent.Future<V>
,java.lang.Runnable
,java.util.concurrent.Future<V>
,java.util.concurrent.RunnableFuture<V>
,Awaitable
,Future<V>
,RunnableFuture<V>
public class FutureTaskWithResources<V> extends FutureTask<V>
A FutureTask that utilises Cassandra'sAsyncFuture
, making it compatible withExecutorPlus
. Encapsulates aWithResources
; 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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.cassandra.utils.concurrent.Awaitable
Awaitable.AbstractAwaitable, Awaitable.AsyncAwaitable, Awaitable.Defaults, Awaitable.SyncAwaitable
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.utils.concurrent.AbstractFuture
CANCELLED, UNCANCELLABLE, UNSET
-
-
Constructor Summary
Constructors Constructor Description FutureTaskWithResources(WithResources withResources, java.lang.Runnable task)
FutureTaskWithResources(WithResources withResources, java.util.concurrent.Callable<V> call)
-
Method Summary
-
Methods inherited from class org.apache.cassandra.concurrent.FutureTask
callable, callable, callable, callable, description, run, tryFailure
-
Methods inherited from class org.apache.cassandra.utils.concurrent.AsyncFuture
await, awaitUntil, flatMap, map
-
Methods inherited from class org.apache.cassandra.utils.concurrent.AbstractFuture
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.utils.concurrent.Awaitable
await, awaitThrowUncheckedOnInterrupt, awaitUninterruptibly, awaitUntil, awaitUntilThrowUncheckedOnInterrupt, awaitUntilUninterruptibly
-
Methods inherited from interface io.netty.util.concurrent.Future
await, awaitUninterruptibly, cancel, cause, getNow, isCancellable, isSuccess
-
Methods inherited from interface org.apache.cassandra.utils.concurrent.Future
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
-
-
-
-
Constructor Detail
-
FutureTaskWithResources
public FutureTaskWithResources(WithResources withResources, java.util.concurrent.Callable<V> call)
-
FutureTaskWithResources
public FutureTaskWithResources(WithResources withResources, java.lang.Runnable task)
-
-