Package com.google.cloud.spanner
Class DelayedAsyncRunner
java.lang.Object
com.google.cloud.spanner.DelayedAsyncRunner
- All Implemented Interfaces:
AsyncRunner
Represents a
AsyncRunner using a multiplexed session that is not yet ready. The execution
will be delayed until the multiplexed session has been created and is ready. This class is only
used during the startup of the client and the multiplexed session has not yet been created.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.cloud.spanner.AsyncRunner
AsyncRunner.AsyncWork<R> -
Constructor Summary
ConstructorsConstructorDescriptionDelayedAsyncRunner(com.google.api.core.ApiFuture<AsyncRunner> asyncRunnerFuture) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.api.core.ApiFuture<CommitResponse>Returns theCommitResponseof this transaction.com.google.api.core.ApiFuture<com.google.cloud.Timestamp>Returns the timestamp at which the transaction committed.<R> com.google.api.core.ApiFuture<R>runAsync(AsyncRunner.AsyncWork<R> work, Executor executor) Executes a read/write transaction asynchronously using the given executor.
-
Constructor Details
-
DelayedAsyncRunner
-
-
Method Details
-
runAsync
public <R> com.google.api.core.ApiFuture<R> runAsync(AsyncRunner.AsyncWork<R> work, Executor executor) Description copied from interface:AsyncRunnerExecutes a read/write transaction asynchronously using the given executor.- Specified by:
runAsyncin interfaceAsyncRunner
-
getCommitTimestamp
public com.google.api.core.ApiFuture<com.google.cloud.Timestamp> getCommitTimestamp()Description copied from interface:AsyncRunnerReturns the timestamp at which the transaction committed.Future.get()will throw anExecutionExceptionif the transaction did not commit.- Specified by:
getCommitTimestampin interfaceAsyncRunner
-
getCommitResponse
Description copied from interface:AsyncRunnerReturns theCommitResponseof this transaction.Future.get()throws anExecutionExceptionif the transaction did not commit.- Specified by:
getCommitResponsein interfaceAsyncRunner
-