Interface TransactionRetryListener (2.9.2)

public interface TransactionRetryListener

Use com.google.cloud.spanner.connection.TransactionRetryListener

Methods

retryFinished(Timestamp transactionStarted, long transactionId, int retryAttempt, TransactionRetryListener.RetryResult result)

public abstract void retryFinished(Timestamp transactionStarted, long transactionId, int retryAttempt, TransactionRetryListener.RetryResult result)

This method is called when a retry has finished.

Parameters
NameDescription
transactionStartedcom.google.cloud.Timestamp

The start date/time of the transaction that is retrying.

transactionIdlong

An internally assigned ID of the transaction (unique during the lifetime of the JVM) that can be used to identify the transaction for logging purposes.

retryAttemptint

The number of retry attempts the current transaction has executed, including the current retry attempt.

resultTransactionRetryListener.RetryResult

The result of the retry indicating whether the retry was successful or not.

retryStarting(Timestamp transactionStarted, long transactionId, int retryAttempt)

public abstract void retryStarting(Timestamp transactionStarted, long transactionId, int retryAttempt)

This method is called when a retry is about to start.

Parameters
NameDescription
transactionStartedcom.google.cloud.Timestamp

The start date/time of the transaction that is retrying.

transactionIdlong

An internally assigned ID of the transaction (unique during the lifetime of the JVM) that can be used to identify the transaction for logging purposes.

retryAttemptint

The number of retry attempts the current transaction has executed, including the current retry attempt.