Class CockroachRetryingTransactionalExecutionTemplate
- java.lang.Object
-
- migratedb.v1.core.internal.jdbc.TransactionalExecutionTemplate
-
- migratedb.v1.core.internal.database.cockroachdb.CockroachRetryingTransactionalExecutionTemplate
-
- All Implemented Interfaces:
ExecutionTemplate
public class CockroachRetryingTransactionalExecutionTemplate extends TransactionalExecutionTemplate
Spring-like template for executing transactions. Cockroach always operates with transaction isolation level SERIALIZABLE and needs a retrying pattern.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Texecute(Callable<T> transactionCallback)Executes this callback within a transaction
-
-
-
Method Detail
-
execute
public <T> T execute(Callable<T> transactionCallback)
Executes this callback within a transaction- Specified by:
executein interfaceExecutionTemplate- Overrides:
executein classTransactionalExecutionTemplate- Parameters:
transactionCallback- The callback to execute.- Returns:
- The result of the transaction code.
-
-