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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of retries after the initial recovery attempt.Returns the maximum delay before a recovery retry.Returns the initial retry delay.intReturns the multiplier applied to the delay after each retry.voidsetMaxRetries(int maxRetries) Sets the number of retries after the initial recovery attempt.voidsetMaxRetryDelay(Duration maxRetryDelay) Sets the upper bound for every retry delay, including the first retry.voidsetRetryDelay(Duration retryDelay) Sets the delay before the first retry of a failed recovery attempt.voidsetRetryDelayMultiplier(int retryDelayMultiplier) Sets the multiplier applied to the delay after each retry.
-
Field Details
-
PREFIX
-
-
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
-1for 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-1for unlimited retries- Throws:
IllegalArgumentException- if the value is less than-1
-
getRetryDelay
Returns the initial retry delay. Defaults to one second.- Returns:
- the retry delay
-
setRetryDelay
Sets the delay before the first retry of a failed recovery attempt. Subsequent delays are multiplied bygetRetryDelayMultiplier()and capped atgetMaxRetryDelay().- 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
Returns the maximum delay before a recovery retry. Defaults to sixty seconds.- Returns:
- the maximum retry delay
-
setMaxRetryDelay
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
-