Class CockroachDBRetryingStrategy
java.lang.Object
migratedb.v1.core.internal.database.cockroachdb.CockroachDBRetryingStrategy
- All Implemented Interfaces:
DatabaseExecutionStrategy
CockroachDB recommend the use of retries should we see a SQL error code 40001, which represents a lock wait timeout.
This class implements an appropriate retry pattern.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Texecute(SqlCallable<T> callable) Execute the given callable using the defined strategy.
-
Constructor Details
-
CockroachDBRetryingStrategy
public CockroachDBRetryingStrategy()
-
-
Method Details
-
execute
Description copied from interface:DatabaseExecutionStrategyExecute the given callable using the defined strategy.- Specified by:
executein interfaceDatabaseExecutionStrategy- Type Parameters:
T- The return type of the SQL callable.- Parameters:
callable- The SQL callable to execute.- Returns:
- The object returned by the SQL callable.
- Throws:
SQLException
-