Class DelayedAsyncRunner (6.89.0)

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.

Inheritance

java.lang.Object > DelayedAsyncRunner

Implements

AsyncRunner

Constructors

DelayedAsyncRunner(ApiFuture<AsyncRunner> asyncRunnerFuture)

public DelayedAsyncRunner(ApiFuture<AsyncRunner> asyncRunnerFuture)
Parameter
NameDescription
asyncRunnerFutureApiFuture<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.

Parameters
NameDescription
workAsyncWork<R>
executorExecutor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ApiFuture<com.google.cloud.Timestamp>