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

    Fields inherited from class com.microsoft.rest.retry.RetryStrategy

    DEFAULT_CLIENT_RETRY_COUNT, DEFAULT_FIRST_FAST_RETRY, DEFAULT_RETRY_INTERVAL
  • Constructor Summary

    Constructors 
    Constructor Description
    PartnerServiceRetryStrategy​(int maxRetryAttempts)
    Initializes a new instance of the PartnerServiceRetryStrategy class.
  • Method Summary

    Modifier and Type Method Description
    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.

    Methods inherited from class com.microsoft.rest.retry.RetryStrategy

    isFastFirstRetry, name

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • 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:
      shouldRetry in class com.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.