Class CockroachRetryingTransactionalExecutionTemplate

java.lang.Object
org.flywaydb.core.internal.jdbc.TransactionalExecutionTemplate
org.flywaydb.database.cockroachdb.CockroachRetryingTransactionalExecutionTemplate
All Implemented Interfaces:
org.flywaydb.core.internal.jdbc.ExecutionTemplate

public class CockroachRetryingTransactionalExecutionTemplate extends org.flywaydb.core.internal.jdbc.TransactionalExecutionTemplate
Spring-like template for executing transactions. Cockroach always operates with transaction isolation level SERIALIZABLE and needs a retrying pattern.
  • Method Details

    • execute

      public <T> T execute(Callable<T> transactionCallback)
      Executes this callback within a transaction
      Specified by:
      execute in interface org.flywaydb.core.internal.jdbc.ExecutionTemplate
      Overrides:
      execute in class org.flywaydb.core.internal.jdbc.TransactionalExecutionTemplate
      Parameters:
      transactionCallback - The callback to execute.
      Returns:
      The result of the transaction code.