Class RetryOptions
java.lang.Object
com.microsoft.graph.httpcore.middlewareoption.RetryOptions
- All Implemented Interfaces:
IMiddlewareControl
The options to be passed to the retry middleware.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longDefault retry delaystatic final intDefault maximum number of retriesstatic final IShouldRetryDefault retry evaluation, always retry.static final longAbsolute maximum retry delaystatic final intAbsolute maximum number of retries -
Constructor Summary
ConstructorsConstructorDescriptionCreate default instance of retry options, with default values of delay, max retries and shouldRetry callback.RetryOptions(IShouldRetry shouldRetry, int maxRetries, long delay) Create an instance with provided values -
Method Summary
-
Field Details
-
DEFAULT_SHOULD_RETRY
Default retry evaluation, always retry. -
MAX_RETRIES
public static final int MAX_RETRIESAbsolute maximum number of retries- See Also:
-
DEFAULT_MAX_RETRIES
public static final int DEFAULT_MAX_RETRIESDefault maximum number of retries- See Also:
-
DEFAULT_DELAY
public static final long DEFAULT_DELAYDefault retry delay- See Also:
-
MAX_DELAY
public static final long MAX_DELAYAbsolute maximum retry delay- See Also:
-
-
Constructor Details
-
RetryOptions
public RetryOptions()Create default instance of retry options, with default values of delay, max retries and shouldRetry callback. -
RetryOptions
Create an instance with provided values- Parameters:
shouldRetry- Retry callback to be called before making a retrymaxRetries- Number of max retires for a requestdelay- Delay in seconds between retries
-
-
Method Details
-
shouldRetry
- Returns:
- should retry callback
-
maxRetries
public int maxRetries()- Returns:
- Number of max retries
-
delay
public long delay()- Returns:
- Delay in seconds between retries
-