Class SalRetryConnectionCallback<T>

java.lang.Object
com.atlassian.confluence.internal.persistence.SalRetryConnectionCallback<T>
All Implemented Interfaces:
org.springframework.retry.RetryCallback<T,RuntimeException>

public class SalRetryConnectionCallback<T> extends Object implements org.springframework.retry.RetryCallback<T,RuntimeException>
A helper class, defining the utility method execute(org.springframework.retry.support.RetryTemplate, com.atlassian.sal.api.rdbms.TransactionalExecutor, com.atlassian.sal.api.rdbms.ConnectionCallback<T>) to call TransactionalExecutor.execute(ConnectionCallback) with a RetryTemplate.
Since:
9.1
  • Method Summary

    Modifier and Type
    Method
    Description
    doWithRetry(org.springframework.retry.RetryContext context)
     
    static <T> T
    execute(org.springframework.retry.support.RetryTemplate retryTemplate, com.atlassian.sal.api.rdbms.TransactionalExecutor executor, com.atlassian.sal.api.rdbms.ConnectionCallback<T> callback)
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • execute

      public static <T> T execute(org.springframework.retry.support.RetryTemplate retryTemplate, com.atlassian.sal.api.rdbms.TransactionalExecutor executor, com.atlassian.sal.api.rdbms.ConnectionCallback<T> callback)
    • getLabel

      public String getLabel()
      Specified by:
      getLabel in interface org.springframework.retry.RetryCallback<T,RuntimeException>
    • doWithRetry

      public T doWithRetry(org.springframework.retry.RetryContext context) throws RuntimeException
      Specified by:
      doWithRetry in interface org.springframework.retry.RetryCallback<T,RuntimeException>
      Throws:
      RuntimeException