@Test public void shouldRetry_MaxErrorNotExceeded_DelegatesToLegacyRetryCondition() { final RetryPolicyContext context = RetryPolicyContexts.LEGACY; adapter.shouldRetry(context); verify(retryCondition).shouldRetry( eq((AmazonWebServiceRequest) context.originalRequest()), eq((AmazonClientException) context.exception()), eq(context.retriesAttempted())); }
@Override public boolean shouldRetry(RetryPolicyContext context) { return !maxRetriesExceeded(context) && isRetryable(context); }
RetryPolicyAdapter implements com.ibm.cloud.objectstorage.retry.v2.RetryPolicy { @Override public boolean shouldRetry(RetryPolicyContext context) { return !maxRetriesExceeded(context) && isRetryable(context); } }
RetryPolicyAdapter implements com.ibm.cloud.objectstorage.retry.v2.RetryPolicy { @Override public boolean shouldRetry(RetryPolicyContext context) { return !maxRetriesExceeded(context) && isRetryable(context); } RetryPolicyAdapter(RetryPolicy legacyRetryPolicy, ClientConfiguration clientConfiguration); }
RetryPolicyAdapter implements com.ibm.cloud.objectstorage.retry.v2.RetryPolicy { @Override public boolean shouldRetry(RetryPolicyContext context) { return !maxRetriesExceeded(context) && isRetryable(context); } RetryPolicyAdapter(RetryPolicy legacyRetryPolicy, ClientConfiguration clientConfiguration); @Override long computeDelayBeforeNextRetry(RetryPolicyContext context); @Override boolean shouldRetry(RetryPolicyContext context); boolean isRetryable(RetryPolicyContext context); RetryPolicy getLegacyRetryPolicy(); boolean maxRetriesExceeded(RetryPolicyContext context); }
RetryPolicyAdapter implements com.ibm.cloud.objectstorage.retry.v2.RetryPolicy { @Override public boolean shouldRetry(RetryPolicyContext context) { return !maxRetriesExceeded(context) && isRetryable(context); } RetryPolicyAdapter(RetryPolicy legacyRetryPolicy, ClientConfiguration clientConfiguration); @Override long computeDelayBeforeNextRetry(RetryPolicyContext context); @Override boolean shouldRetry(RetryPolicyContext context); boolean isRetryable(RetryPolicyContext context); RetryPolicy getLegacyRetryPolicy(); boolean maxRetriesExceeded(RetryPolicyContext context);  }