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'sgetmethod
- All Implemented Interfaces:
Future<T>,ListenableFuture<T>
Deprecated.
Adapts a
CompletableFuture or CompletionStage into a Spring ListenableFuture applying
PersistenceExceptionTranslator.- Since:
- 3.0
-
Constructor Summary
ConstructorsConstructorDescriptionCassandraFutureAdapter(CompletableFuture<T> completableFuture, PersistenceExceptionTranslator exceptionMapper) Deprecated.Create a new adapter for the givenCompletableFuture.CassandraFutureAdapter(CompletionStage<T> completionStage, PersistenceExceptionTranslator exceptionMapper) Deprecated.Create a new adapter for the givenCompletionStage. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCallback(ListenableFutureCallback<? super T> callback) Deprecated.voidaddCallback(SuccessCallback<? super T> successCallback, FailureCallback failureCallback) Deprecated.booleancancel(boolean mayInterruptIfRunning) Deprecated.Deprecated.get()Deprecated.Deprecated.booleanDeprecated.booleanisDone()Deprecated.
-
Constructor Details
-
CassandraFutureAdapter
public CassandraFutureAdapter(CompletionStage<T> completionStage, PersistenceExceptionTranslator exceptionMapper) Deprecated.Create a new adapter for the givenCompletionStage. -
CassandraFutureAdapter
public CassandraFutureAdapter(CompletableFuture<T> completableFuture, PersistenceExceptionTranslator exceptionMapper) Deprecated.Create a new adapter for the givenCompletableFuture.
-
-
Method Details
-
addCallback
Deprecated.- Specified by:
addCallbackin interfaceListenableFuture<T>
-
addCallback
public void addCallback(SuccessCallback<? super T> successCallback, FailureCallback failureCallback) Deprecated.- Specified by:
addCallbackin interfaceListenableFuture<T>
-
completable
Deprecated.- Specified by:
completablein interfaceListenableFuture<T>
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) Deprecated. -
isCancelled
public boolean isCancelled()Deprecated.- Specified by:
isCancelledin interfaceFuture<T>
-
isDone
public boolean isDone()Deprecated. -
get
Deprecated.- Specified by:
getin interfaceFuture<T>- Throws:
InterruptedExceptionExecutionException
-
get
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException Deprecated.- Specified by:
getin interfaceFuture<T>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
CompletableFuturedirectly.