Class PartnerServiceRetryStrategy
java.lang.Object
com.microsoft.rest.retry.RetryStrategy
com.microsoft.store.partnercenter.network.PartnerServiceRetryStrategy
public class PartnerServiceRetryStrategy
extends com.microsoft.rest.retry.RetryStrategy
Represents a retry strategy that determines the number of retry attempts and
the interval between retries.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PartnerServiceRetryStrategy(int maxRetryAttempts)Initializes a new instance of thePartnerServiceRetryStrategyclass. -
Method Summary
Modifier and Type Method Description booleanshouldRetry(int retryCount, okhttp3.Response response)Returns if a request should be retried based on the retry count, current response, and the current strategy.
-
Constructor Details
-
PartnerServiceRetryStrategy
public PartnerServiceRetryStrategy(int maxRetryAttempts)Initializes a new instance of thePartnerServiceRetryStrategyclass.- Parameters:
maxRetryAttempts- The maximum number of retry attempts.
-
-
Method Details
-
shouldRetry
public boolean shouldRetry(int retryCount, okhttp3.Response response)Returns if a request should be retried based on the retry count, current response, and the current strategy.- Specified by:
shouldRetryin classcom.microsoft.rest.retry.RetryStrategy- Parameters:
retryCount- The current retry attempt count.response- The exception that caused the retry conditions to occur.- Returns:
- true if the request should be retried; false otherwise.
-