public class DelayedAsyncRunner implements 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.
Implements
AsyncRunnerInherited Members
Constructors
DelayedAsyncRunner(ApiFuture<AsyncRunner> asyncRunnerFuture)
public DelayedAsyncRunner(ApiFuture<AsyncRunner> asyncRunnerFuture)
Parameter | |
---|---|
Name | Description |
asyncRunnerFuture |
ApiFuture<AsyncRunner> |
Methods
<R>runAsync(AsyncRunner.AsyncWork<R> work, Executor executor)
public ApiFuture<R> <R>runAsync(AsyncRunner.AsyncWork<R> work, Executor executor)
Executes a read/write transaction asynchronously using the given executor.
Returns | |
---|---|
Type | Description |
ApiFuture<R> |
getCommitResponse()
public ApiFuture<CommitResponse> getCommitResponse()
Returns the CommitResponse of this transaction. ApiFuture#get() throws an ExecutionException if the transaction did not commit.
Returns | |
---|---|
Type | Description |
ApiFuture<CommitResponse> |
getCommitTimestamp()
public ApiFuture<Timestamp> getCommitTimestamp()
Returns the timestamp at which the transaction committed. ApiFuture#get() will throw an ExecutionException if the transaction did not commit.
Returns | |
---|---|
Type | Description |
ApiFuture<com.google.cloud.Timestamp> |