public final class Retriers extends Object
Group of utility methods to configure the SDK retry behavior
Modifier and Type | Method and Description |
---|---|
static BmcGenericRetrier |
createPreferredRetrier(RetryConfiguration requestRetryConfiguration,
RetryConfiguration clientRetryConfiguration)
Choose the desired retry configuration and use it to create the retrier.
|
static void |
setDefaultRetryConfiguration(@NonNull RetryConfiguration retryConfiguration)
Setter for the default retry configuration used in the SDK.
|
static boolean |
shouldSendOpcRetryToken()
Gets whether the SDK is automatically sending the opc-retry-token header
|
static void |
shouldSendOpcRetryToken(boolean shouldSendOpcRetryToken)
Sets whether the SDK should automatically send the opc-retry-token header
|
public static void setDefaultRetryConfiguration(@NonNull @NonNull RetryConfiguration retryConfiguration)
Setter for the default retry configuration used in the SDK. This can be overriden by setting a retry configuration on the client (via ClientConfiguration
) or the request (via BmcRequest.setRetryConfiguration(RetryConfiguration)
)
retryConfiguration
- the RetryConfiguration
to usepublic static void shouldSendOpcRetryToken(boolean shouldSendOpcRetryToken)
Sets whether the SDK should automatically send the opc-retry-token header
shouldSendOpcRetryToken
- if true
, then the SDK will automatically send the opc-retry-token headerpublic static boolean shouldSendOpcRetryToken()
Gets whether the SDK is automatically sending the opc-retry-token header
true
if the SDK automatically sends the opc-retry-token header, else false
public static BmcGenericRetrier createPreferredRetrier(@Nullable RetryConfiguration requestRetryConfiguration, @Nullable RetryConfiguration clientRetryConfiguration)
Choose the desired retry configuration and use it to create the retrier.
requestRetryConfiguration
- the retry configuration set on the request objectclientRetryConfiguration
- the retry configuration set on the client objectCopyright © 2016–2020. All rights reserved.