Class RetryConfig
java.lang.Object
io.confluent.telemetry.config.remote.polling.RetryConfig
Configuration for retry behavior with exponential backoff.
This class is immutable and thread-safe.
-
Method Summary
Modifier and TypeMethodDescriptionlongcalculateDelay(int attemptNumber) Calculates the delay for a specific retry attempt using exponential backoff.booleanstatic RetryConfigfrom(PollingRemoteConfigurationConfig config) Creates a RetryConfig from PollingRemoteConfigurationConfig.intinthashCode()booleanstatic RetryConfigCreates a RetryConfig that results in no retries.toString()
-
Method Details
-
from
Creates a RetryConfig from PollingRemoteConfigurationConfig. -
noRetries
Creates a RetryConfig that results in no retries. -
getMaxAttempts
public int getMaxAttempts()- Returns:
- the maximum number of retry attempts (0 disables retries)
-
isRetryEnabled
public boolean isRetryEnabled()- Returns:
- true if retries are enabled (maxAttempts > 0)
-
calculateDelay
public long calculateDelay(int attemptNumber) Calculates the delay for a specific retry attempt using exponential backoff.- Parameters:
attemptNumber- the attempt number (1-based, where 1 is the first retry)- Returns:
- the delay in milliseconds, capped at maxDelayMs
-
equals
-
hashCode
public int hashCode() -
toString
-