Class OracleNotificationConfiguration.RegistrationRecoveryConfiguration

java.lang.Object
io.micronaut.data.jdbc.notification.oracle.OracleNotificationConfiguration.RegistrationRecoveryConfiguration
Enclosing class:
OracleNotificationConfiguration

@Requires(classes=oracle.jdbc.OracleConnection.class) @ConfigurationProperties("registration-recovery") public static final class OracleNotificationConfiguration.RegistrationRecoveryConfiguration extends Object
Global settings for recreating unavailable Oracle Database notification registrations.

These settings apply to every Oracle notification listener across all datasources. They do not control listener-method retries or the JDBC driver's notification-connection retries.

Since:
5.3.0
  • Field Details

  • Constructor Details

    • RegistrationRecoveryConfiguration

      public RegistrationRecoveryConfiguration()
  • Method Details

    • getMaxRetries

      public int getMaxRetries()
      Returns the number of retries after the initial recovery attempt. Defaults to unlimited.
      Returns:
      the maximum number of retries, or -1 for unlimited retries
    • setMaxRetries

      public void setMaxRetries(int maxRetries)
      Sets the number of retries after the initial recovery attempt. Zero allows only that initial attempt.
      Parameters:
      maxRetries - the non-negative maximum number of retries, or -1 for unlimited retries
      Throws:
      IllegalArgumentException - if the value is less than -1
    • getRetryDelay

      public Duration getRetryDelay()
      Returns the initial retry delay. Defaults to one second.
      Returns:
      the retry delay
    • setRetryDelay

      public void setRetryDelay(Duration retryDelay)
      Sets the delay before the first retry of a failed recovery attempt. Subsequent delays are multiplied by getRetryDelayMultiplier() and capped at getMaxRetryDelay().
      Parameters:
      retryDelay - the positive retry delay
      Throws:
      IllegalArgumentException - if the delay is zero or negative
    • getRetryDelayMultiplier

      public int getRetryDelayMultiplier()
      Returns the multiplier applied to the delay after each retry. Defaults to two.
      Returns:
      the retry delay multiplier
    • setRetryDelayMultiplier

      public void setRetryDelayMultiplier(int retryDelayMultiplier)
      Sets the multiplier applied to the delay after each retry. One uses a fixed delay.
      Parameters:
      retryDelayMultiplier - the integer multiplier, at least one
      Throws:
      IllegalArgumentException - if the multiplier is less than one
    • getMaxRetryDelay

      public Duration getMaxRetryDelay()
      Returns the maximum delay before a recovery retry. Defaults to sixty seconds.
      Returns:
      the maximum retry delay
    • setMaxRetryDelay

      public void setMaxRetryDelay(Duration maxRetryDelay)
      Sets the upper bound for every retry delay, including the first retry.
      Parameters:
      maxRetryDelay - the positive maximum retry delay
      Throws:
      IllegalArgumentException - if the delay is zero or negative