Module spring.data.cassandra
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(forRemoval=true)
public class CassandraFutureAdapter<T>
extends Object
implements ListenableFuture<T>
Deprecated, for removal: This API element is subject to removal in a future version.
Adapts a
CompletableFuture or CompletionStage into a Spring ListenableFuture applying
PersistenceExceptionTranslator.- Since:
- 3.0
-
Constructor Summary
ConstructorsConstructorDescriptionCassandraFutureAdapter(CompletableFuture<T> completableFuture, PersistenceExceptionTranslator exceptionMapper) Deprecated, for removal: This API element is subject to removal in a future version.Create a new adapter for the givenCompletableFuture.CassandraFutureAdapter(CompletionStage<T> completionStage, PersistenceExceptionTranslator exceptionMapper) Deprecated, for removal: This API element is subject to removal in a future version.Create a new adapter for the givenCompletionStage. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCallback(ListenableFutureCallback<? super T> callback) Deprecated, for removal: This API element is subject to removal in a future version.voidaddCallback(SuccessCallback<? super T> successCallback, FailureCallback failureCallback) Deprecated, for removal: This API element is subject to removal in a future version.booleancancel(boolean mayInterruptIfRunning) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.get()Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanisDone()Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Details
-
CassandraFutureAdapter
public CassandraFutureAdapter(CompletionStage<T> completionStage, PersistenceExceptionTranslator exceptionMapper) Deprecated, for removal: This API element is subject to removal in a future version.Create a new adapter for the givenCompletionStage. -
CassandraFutureAdapter
public CassandraFutureAdapter(CompletableFuture<T> completableFuture, PersistenceExceptionTranslator exceptionMapper) Deprecated, for removal: This API element is subject to removal in a future version.Create a new adapter for the givenCompletableFuture.
-
-
Method Details
-
addCallback
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
addCallbackin interfaceListenableFuture<T>
-
addCallback
public void addCallback(SuccessCallback<? super T> successCallback, FailureCallback failureCallback) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
addCallbackin interfaceListenableFuture<T>
-
completable
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
completablein interfaceListenableFuture<T>
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) Deprecated, for removal: This API element is subject to removal in a future version. -
isCancelled
public boolean isCancelled()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
isCancelledin interfaceFuture<T>
-
isDone
public boolean isDone()Deprecated, for removal: This API element is subject to removal in a future version. -
get
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getin interfaceFuture<T>- Throws:
InterruptedExceptionExecutionException
-
get
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getin interfaceFuture<T>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
CompletableFuturedirectly.