Package com.cercalia.sdk.util
Class RetryUtil.RetryOptions
java.lang.Object
com.cercalia.sdk.util.RetryUtil.RetryOptions
- Enclosing class:
- RetryUtil
Options for retry behavior.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondelayMs(long delayMs) longintbooleanlogRetries(boolean logRetries) maxAttempts(int maxAttempts) operationName(String operationName)
-
Constructor Details
-
RetryOptions
public RetryOptions()
-
-
Method Details
-
maxAttempts
- Parameters:
maxAttempts- maximum number of attempts.- Returns:
- this options instance.
-
delayMs
- Parameters:
delayMs- delay between retries in milliseconds.- Returns:
- this options instance.
-
logRetries
- Parameters:
logRetries- whether to log retry attempts.- Returns:
- this options instance.
-
operationName
- Parameters:
operationName- name of the operation for logging.- Returns:
- this options instance.
-
getMaxAttempts
public int getMaxAttempts()- Returns:
- maximum number of attempts.
-
getDelayMs
public long getDelayMs()- Returns:
- delay between retries in milliseconds.
-
isLogRetries
public boolean isLogRetries()- Returns:
- whether to log retry attempts.
-
getOperationName
- Returns:
- name of the operation for logging.
-