Class BaseTransientDataAccessRetryController

java.lang.Object
net.solarnetwork.central.web.BaseTransientDataAccessRetryController

public abstract class BaseTransientDataAccessRetryController extends Object
Support for transient data access exception retry handling.
  • Field Details

    • DEFAULT_TRANSIENT_EXCEPTION_RETRY_COUNT

      public static final int DEFAULT_TRANSIENT_EXCEPTION_RETRY_COUNT
      The transientExceptionRetryCount property default value.
      See Also:
    • DEFAULT_TRANSIENT_EXCEPTION_RETRY_DELAY

      public static final long DEFAULT_TRANSIENT_EXCEPTION_RETRY_DELAY
      The transientExceptionRetryDelay property default value.
      See Also:
    • log

      protected final org.slf4j.Logger log
      A class-level logger.
  • Constructor Details

    • BaseTransientDataAccessRetryController

      public BaseTransientDataAccessRetryController()
  • Method Details

    • getTransientExceptionRetryCount

      public final int getTransientExceptionRetryCount()
      Get the number of retry attempts for transient DAO exceptions.
      Returns:
      the retry count; defaults to DEFAULT_TRANSIENT_EXCEPTION_RETRY_COUNT.
    • setTransientExceptionRetryCount

      public final void setTransientExceptionRetryCount(int transientExceptionRetryCount)
      Set the number of retry attempts for transient DAO exceptions.
      Parameters:
      transientExceptionRetryCount - the retry count, or 0 for no retries
    • getTransientExceptionRetryDelay

      public final long getTransientExceptionRetryDelay()
      Get the length of time, in milliseconds, to sleep before retrying a request after a transient exception.
      Returns:
      the delay, in milliseconds; defaults to DEFAULT_TRANSIENT_EXCEPTION_RETRY_DELAY
    • setTransientExceptionRetryDelay

      public final void setTransientExceptionRetryDelay(long transientExceptionRetryDelay)
      Set the length of time, in milliseconds, to sleep before retrying a request after a transient exception.
      Parameters:
      transientExceptionRetryDelay - the delay to set