ReleaseCapacity() private static method

This method releases capacity back. This is invoked by the TryReleaseCapacity method.
private static ReleaseCapacity ( int capacity, RetryCapacity retryCapacity ) : void
capacity int
retryCapacity RetryCapacity Contains the RetryCapacity object for the said ServiceURL.
return void
Ejemplo n.º 1
0
 /// <summary>
 /// Virtual method that gets called on a success Response. If its a retry success response, the entire
 /// retry acquired capacity is released(default is 5). If its just a success response a lesser value capacity
 /// is released(default is 1).
 /// </summary>
 /// <param name="executionContext">Request context containing the state of the request.</param>
 public override void NotifySuccess(IExecutionContext executionContext)
 {
     if (executionContext.RequestContext.ClientConfig.ThrottleRetries && RetryCapacity != null)
     {
         _capacityManagerInstance.ReleaseCapacity(executionContext.RequestContext.LastCapacityType, RetryCapacity);
     }
 }