Class RetryHandler
java.lang.Object
io.confluent.telemetry.config.remote.polling.RetryHandler
Handles retry logic with exponential backoff for remote configuration requests.
This class is thread-safe and stateless.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecuteWithRetry(Supplier<RequestConfigResult> supplier, RetryConfig retryConfig) Executes the given supplier with retry logic and exponential backoff.
-
Constructor Details
-
RetryHandler
public RetryHandler()
-
-
Method Details
-
executeWithRetry
public RequestConfigResult executeWithRetry(Supplier<RequestConfigResult> supplier, RetryConfig retryConfig) Executes the given supplier with retry logic and exponential backoff. Only retries when the result indicates a retryable error.- Parameters:
supplier- the operation to execute and potentially retryretryConfig- the retry configuration- Returns:
- the result from the supplier, either successful or final failure
- Throws:
NullPointerException- if supplier or retryConfig is null
-