Package com.google.cloud.spanner
Interface AsyncRunner
- All Known Implementing Classes:
DelayedAsyncRunner
public interface AsyncRunner
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceFunctional interface for executing a read/write transaction asynchronously that returns a result of type R. -
Method Summary
Modifier and TypeMethodDescriptionReturns theCommitResponseof this transaction.Returns the timestamp at which the transaction committed.<R> ApiFuture<R>runAsync(AsyncRunner.AsyncWork<R> work, Executor executor) Executes a read/write transaction asynchronously using the given executor.
-
Method Details
-
runAsync
Executes a read/write transaction asynchronously using the given executor. -
getCommitTimestamp
Returns the timestamp at which the transaction committed.Future.get()will throw anExecutionExceptionif the transaction did not commit. -
getCommitResponse
ApiFuture<CommitResponse> getCommitResponse()Returns theCommitResponseof this transaction.Future.get()throws anExecutionExceptionif the transaction did not commit.
-