Class 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's 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.
    • Constructor Detail

      • FutureTaskWithResources

        public FutureTaskWithResources​(WithResources withResources,
                                       java.util.concurrent.Callable<V> call)
      • FutureTaskWithResources

        public FutureTaskWithResources​(WithResources withResources,
                                       java.lang.Runnable task)