| Modifier and Type | Field and Description |
|---|---|
| private static volatile RetryConfiguration | |
| private static final Logger | |
| private static final String | OCI_SDK_DEFAULT_RETRY_ENABLED_ENV_VAR
The environment variable to control default retry behavior |
| private static volatile boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static BmcGenericRetrier | Returns: The retrier based on the appropriate retry configurationthe retry configuration set on the request object requestRetryConfiguration, final RetryConfiguration the retry configuration set on the client object clientRetryConfiguration)Choose the desired retry configuration and use it to create the retrier. |
| public static BmcGenericRetrier | Returns: The retrier based on the appropriate retry configurationthe retry configuration set on the request object requestRetryConfiguration, final RetryConfiguration the retry configuration set on the client object clientRetryConfiguration, boolean boolean value indicating if default retry is enabled via
spec specBasedDefaultRetryEnabled)Choose the desired retry configuration and use it to create the retrier. |
| private static RetryConfiguration | |
| public static RetryConfiguration | Returns: the defaultRetryConfiguration setGetter for the default retry configuration. |
| public static RetryConfiguration | Returns: The appropriate retry configurationthe retry configuration set on the request object requestRetryConfiguration, RetryConfiguration the retry configuration set on the client object clientRetryConfiguration, boolean boolean value indicating if default retry is enabled via
spec specBasedDefaultRetryEnabled)Choose the desired retry configuration. |
| public static void | setDefaultRetryConfiguration(final RetryConfiguration
the retryConfiguration)RetryConfiguration to useSetter for the default retry configuration used in the SDK. |
| public static boolean | Returns: true if we should prepare for retriesretry configuration rc)Returns true if the retry configuration indicates that we should prepare for retries. |
| public static void | shouldSendOpcRetryToken(boolean
if shouldSendOpcRetryToken)true, then the SDK will automatically send the
opc-retry-token headerSets whether the SDK should automatically send the opc-retry-token header |
| public static boolean | Returns: true if the SDK automatically sends the opc-retry-token header, else falseGets whether the SDK is automatically sending the opc-retry-token header |
| public static void | tryResetStreamForRetry(InputStream body)
Try to reset the |
| public static void | tryResetStreamForRetry(InputStream body, boolean
if true, fail if unsupported failIfUnsupported)Try to reset the |
| public static < type of the request T extends BmcRequest | Returns: request with the input stream wrappedrequest being handled request, BmcRequest.builder for the request builder,the effective retry configuration for this request retryConfiguration)Wrap the input stream in the request so retries can work. |
| public static InputStream | Returns: the input stream wrappedinput stream body body)Wrap the input stream so retries can work. |
| DEFAULT_RETRY_CONFIGURATION | back to summary |
|---|---|
| private static volatile RetryConfiguration DEFAULT_RETRY_CONFIGURATION | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| OCI_SDK_DEFAULT_RETRY_ENABLED_ENV_VAR | back to summary |
|---|---|
| private static final String OCI_SDK_DEFAULT_RETRY_ENABLED_ENV_VAR The environment variable to control default retry behavior | |
| SEND_OPC_RETRY_TOKEN | back to summary |
|---|---|
| private static volatile boolean SEND_OPC_RETRY_TOKEN | |
| Retriers | back to summary |
|---|---|
| private Retriers() | |
| createPreferredRetrier | back to summary |
|---|---|
| public static BmcGenericRetrier createPreferredRetrier(final RetryConfiguration requestRetryConfiguration, final RetryConfiguration clientRetryConfiguration) Choose the desired retry configuration and use it to create the retrier.
| |
| createPreferredRetrier | back to summary |
|---|---|
| public static BmcGenericRetrier createPreferredRetrier(final RetryConfiguration requestRetryConfiguration, final RetryConfiguration clientRetryConfiguration, boolean specBasedDefaultRetryEnabled) Choose the desired retry configuration and use it to create the retrier.
| |
| envBasedRetryConfiguration | back to summary |
|---|---|
| private static RetryConfiguration envBasedRetryConfiguration() | |
| getDefaultRetryConfiguration | back to summary |
|---|---|
| public static RetryConfiguration getDefaultRetryConfiguration() Getter for the default retry configuration. This can be overriden by setting a retry
configuration on the client (via
| |
| getPreferredRetryConfiguration | back to summary |
|---|---|
| public static RetryConfiguration getPreferredRetryConfiguration(RetryConfiguration requestRetryConfiguration, RetryConfiguration clientRetryConfiguration, boolean specBasedDefaultRetryEnabled) Choose the desired retry configuration.
| |
| setDefaultRetryConfiguration | back to summary |
|---|---|
| public static void setDefaultRetryConfiguration(final 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
| |
| shouldPrepareForRetryBecauseOfRetryConfiguration | back to summary |
|---|---|
| public static boolean shouldPrepareForRetryBecauseOfRetryConfiguration(RetryConfiguration rc) Returns true if the retry configuration indicates that we should prepare for retries. We don't need to prepare for retries if the retry configuration is null; or if there is no termination strategy; or if the termination strategy says to make exactly 1 attempt. We do have to prepare for retries if there is a retry configuration and termination strategy, and: (a) the termination strategy is not count-based; or (b) the termination strategy is count-based and we are willing to make more than 1 attempt.
| |
| shouldSendOpcRetryToken | back to summary |
|---|---|
| public static void shouldSendOpcRetryToken(boolean shouldSendOpcRetryToken) Sets whether the SDK should automatically send the opc-retry-token header
| |
| shouldSendOpcRetryToken | back to summary |
|---|---|
| public static boolean shouldSendOpcRetryToken() Gets whether the SDK is automatically sending the opc-retry-token header
| |
| tryResetStreamForRetry | back to summary |
|---|---|
| public static void tryResetStreamForRetry(InputStream body) Try to reset the If the stream supports Note that this means that if the caller has used If the stream does not support If the stream does not support being reset, this method throws an
IllegalArgumentException. This is never the case using the auto-generated code, since streams
are always wrapped and/or buffered appropriately. It could happen if someone sent in a
| |
| tryResetStreamForRetry | back to summary |
|---|---|
| public static void tryResetStreamForRetry(InputStream body, boolean failIfUnsupported) Try to reset the If the stream supports Note that this means that if the caller has used If the stream does not support
| |
| wrapBodyInputStreamIfNecessary | back to summary |
|---|---|
| public static <T extends BmcRequest Wrap the input stream in the request so retries can work. Note The stream in the request may be wrapped in a Example:
| |
| wrapInputStreamForRetry | back to summary |
|---|---|
| public static InputStream wrapInputStreamForRetry(InputStream body) Wrap the input stream so retries can work. Note The stream in the request may be wrapped in a After using this method, you now have to close the stream in a Example:
| |