Class DelayedAsyncRunner (6.95.1)

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 asyncRunnerFuture)

public DelayedAsyncRunner(ApiFuture asyncRunnerFuture)
Parameter
Name Description
asyncRunnerFuture ApiFuture<AsyncRunner>

Methods

runAsync(AsyncRunner.AsyncWork work, Executor executor)

public ApiFuture <R>runAsync(AsyncRunner.AsyncWork work, Executor executor)

Executes a read/write transaction asynchronously using the given executor.

Parameters
Name Description
work AsyncWork<R>
executor Executor
Returns
Type Description
ApiFuture<R>

getCommitResponse()

public ApiFuture 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 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>