Package com.mimecast.robin.config.server
Class RetryConfig
java.lang.Object
com.mimecast.robin.config.ConfigFoundation
com.mimecast.robin.config.BasicConfig
com.mimecast.robin.config.server.RetryConfig
- All Implemented Interfaces:
Serializable
Retry scheduler configuration.
This class provides type-safe access to retry backoff configuration settings
used by the RetryScheduler for determining
wait times between message relay attempts.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault initial wait time in minutes.static final doubleDefault growth factor for geometric progression.static final intDefault total number of retries.Fields inherited from class com.mimecast.robin.config.ConfigFoundation
log, map -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGets the initial wait time in minutes for the first retry.doubleGets the growth factor for geometric progression backoff.intGets the total number of retries before giving up.Methods inherited from class com.mimecast.robin.config.ConfigFoundation
getBooleanProperty, getBooleanProperty, getDoubleProperty, getListProperty, getListProperty, getLongProperty, getLongProperty, getMap, getMapProperty, getMapProperty, getStringProperty, getStringProperty, hasProperty, isEmpty
-
Field Details
-
DEFAULT_TOTAL_RETRIES
public static final int DEFAULT_TOTAL_RETRIESDefault total number of retries.- See Also:
-
DEFAULT_FIRST_WAIT_MINUTES
public static final int DEFAULT_FIRST_WAIT_MINUTESDefault initial wait time in minutes.- See Also:
-
DEFAULT_GROWTH_FACTOR
public static final double DEFAULT_GROWTH_FACTORDefault growth factor for geometric progression.- See Also:
-
-
Constructor Details
-
RetryConfig
Constructs a new RetryConfig instance with given map.- Parameters:
map- Configuration map.
-
-
Method Details
-
getTotalRetries
public int getTotalRetries()Gets the total number of retries before giving up.- Returns:
- Total retries.
-
getFirstWaitMinutes
public int getFirstWaitMinutes()Gets the initial wait time in minutes for the first retry.- Returns:
- First wait time in minutes.
-
getGrowthFactor
public double getGrowthFactor()Gets the growth factor for geometric progression backoff.Each retry wait time is calculated as:
wait_time = firstWaitMinutes * (growthFactor ^ retryCount)- Returns:
- Growth factor.
-