Package org.apache.pinot.spi.utils.retry
Interface RetryPolicy
-
- All Known Implementing Classes:
BaseRetryPolicy,ExponentialBackoffRetryPolicy,FixedDelayRetryPolicy,NoDelayRetryPolicy,RandomDelayRetryPolicy
public interface RetryPolicyRetry policy, encapsulating the logic needed to retry an operation until it succeeds.
-
-
Method Detail
-
attempt
void attempt(Callable<Boolean> operation) throws AttemptsExceededException, RetriableOperationException
Attempts to do the operation until it succeeds, aborting if an exception is thrown by the operation or number of attempts exhausted.- Parameters:
operation- The operation to attempt, which returns true on success and false on failure.- Throws:
AttemptsExceededExceptionRetriableOperationException
-
-