Class CockroachDBRetryingStrategy
- java.lang.Object
-
- migratedb.v1.core.internal.database.cockroachdb.CockroachDBRetryingStrategy
-
- All Implemented Interfaces:
DatabaseExecutionStrategy
public class CockroachDBRetryingStrategy extends Object implements 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 Constructor Description CockroachDBRetryingStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Texecute(SqlCallable<T> callable)Execute the given callable using the defined strategy.
-
-
-
Method Detail
-
execute
public <T> T execute(SqlCallable<T> callable) throws SQLException
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
-
-