Class CassandraFutureAdapter<T>

java.lang.Object
org.springframework.data.cassandra.core.cql.util.CassandraFutureAdapter<T>
Type Parameters:
T - the result type returned by this Future's get method
All Implemented Interfaces:
Future<T>, org.springframework.util.concurrent.ListenableFuture<T>

@Deprecated public class CassandraFutureAdapter<T> extends Object implements org.springframework.util.concurrent.ListenableFuture<T>
Deprecated.
since 3.0, use CompletableFuture directly.
Adapts a CompletableFuture or CompletionStage into a Spring ListenableFuture applying PersistenceExceptionTranslator.
Since:
3.0
  • Constructor Details

    • CassandraFutureAdapter

      public CassandraFutureAdapter(CompletionStage<T> completionStage, org.springframework.dao.support.PersistenceExceptionTranslator exceptionMapper)
      Deprecated.
      Create a new adapter for the given CompletionStage.
    • CassandraFutureAdapter

      public CassandraFutureAdapter(CompletableFuture<T> completableFuture, org.springframework.dao.support.PersistenceExceptionTranslator exceptionMapper)
      Deprecated.
      Create a new adapter for the given CompletableFuture.
  • Method Details

    • addCallback

      public void addCallback(org.springframework.util.concurrent.ListenableFutureCallback<? super T> callback)
      Deprecated.
      Specified by:
      addCallback in interface org.springframework.util.concurrent.ListenableFuture<T>
    • addCallback

      public void addCallback(org.springframework.util.concurrent.SuccessCallback<? super T> successCallback, org.springframework.util.concurrent.FailureCallback failureCallback)
      Deprecated.
      Specified by:
      addCallback in interface org.springframework.util.concurrent.ListenableFuture<T>
    • completable

      public CompletableFuture<T> completable()
      Deprecated.
      Specified by:
      completable in interface org.springframework.util.concurrent.ListenableFuture<T>
    • cancel

      public boolean cancel(boolean mayInterruptIfRunning)
      Deprecated.
      Specified by:
      cancel in interface Future<T>
    • isCancelled

      public boolean isCancelled()
      Deprecated.
      Specified by:
      isCancelled in interface Future<T>
    • isDone

      public boolean isDone()
      Deprecated.
      Specified by:
      isDone in interface Future<T>
    • get

      Deprecated.
      Specified by:
      get in interface Future<T>
      Throws:
      InterruptedException
      ExecutionException
    • get

      public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
      Deprecated.
      Specified by:
      get in interface Future<T>
      Throws:
      InterruptedException
      ExecutionException
      TimeoutException