public RetryCapacity GetRetryCapacity(string serviceURL) { RetryCapacity retryCapacity; if (!(TryGetRetryCapacity(serviceURL, out retryCapacity))) { retryCapacity = AddNewRetryCapacity(serviceURL); } return retryCapacity; }
/// <summary> /// Constructor for DefaultRetryPolicy. /// </summary> /// <param name="config">The Client config object. This is used to /// retrieve the maximum number of retries before throwing /// back a exception(This does not count the initial request) and /// the service URL for the request.</param> public DefaultRetryPolicy(IClientConfig config) { this.MaxRetries = config.MaxErrorRetry; if (config.ThrottleRetries) { string serviceURL = config.DetermineServiceURL(); _retryCapacity = _capacityManagerInstance.GetRetryCapacity(serviceURL); } }