Package com.google.cloud.spanner
Interface AsyncRunner
-
public interface AsyncRunner
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
AsyncRunner.AsyncWork<R>
Functional interface for executing a read/write transaction asynchronously that returns a result of type R.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.google.api.core.ApiFuture<CommitResponse>
getCommitResponse()
Returns theCommitResponse
of this transaction.com.google.api.core.ApiFuture<com.google.cloud.Timestamp>
getCommitTimestamp()
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.
-
-
-
Method Detail
-
runAsync
<R> com.google.api.core.ApiFuture<R> runAsync(AsyncRunner.AsyncWork<R> work, Executor executor)
Executes a read/write transaction asynchronously using the given executor.
-
getCommitTimestamp
com.google.api.core.ApiFuture<com.google.cloud.Timestamp> getCommitTimestamp()
Returns the timestamp at which the transaction committed.Future.get()
will throw anExecutionException
if the transaction did not commit.
-
getCommitResponse
com.google.api.core.ApiFuture<CommitResponse> getCommitResponse()
Returns theCommitResponse
of this transaction.Future.get()
throws anExecutionException
if the transaction did not commit.
-
-