RetryPolicy

public class RetryPolicy extends Object

Object to store policy parameters used for backoff and retry recoverable errors.

Store the maximum allowable number of retries and the back-off algorithm (typically an exponential back-off) to use when recoverable HTTP errors occur.

Nested Class Summary

interface RetryPolicy.BackOffFactory  
class RetryPolicy.Builder  
class RetryPolicy.DefaultBackOffFactoryImpl Default factory object used to create an ExponentialBackOff with an initial delay of 1 second(s) and a multiplier of 2. 

Constant Summary

String CONFIG_MAXIMUM_RETRIES
int DEFAULT_MAXIMUM_RETRIES

Public Method Summary

static RetryPolicy
fromConfiguration()
Creates a retry policy using parameters specified in connector configuration file.
RetryPolicy.BackOffFactory
int
boolean
isRetryableStatusCode(int statusCode)

Inherited Method Summary

Constants

public static final String CONFIG_MAXIMUM_RETRIES

Constant Value: "maxRetryLimit"

public static final int DEFAULT_MAXIMUM_RETRIES

Constant Value: 5

Public Methods

public static RetryPolicy fromConfiguration ()

Creates a retry policy using parameters specified in connector configuration file.

  • maxRetryLimit=5 - maximum number of retries of failed (but recoverable) API calls.

public RetryPolicy.BackOffFactory getBackOffFactory ()

public int getMaxRetryLimit ()

public boolean isRetryableStatusCode (int statusCode)

Parameters
statusCode

Send feedback about...

Cloud Search
Cloud Search