C# Class Amazon.Runtime.Internal.CapacityManager

This class is responsible for keeping track of Retry capacity across different ServiceURLs.
Inheritance: IDisposable
Afficher le fichier Open project: aws/aws-sdk-net Class Usage Examples

Méthodes publiques

Méthode Description
CapacityManager ( int throttleRetryCount, int throttleRetryCost, int throttleCost ) : System
Dispose ( ) : void
GetRetryCapacity ( string serviceURL ) : RetryCapacity

Ths method fetches the RetryCapacity for the given ServiceURL from CapacityManager.CapacityContainer

TryAcquireCapacity ( RetryCapacity retryCapacity ) : bool

This method acquires a said retry capacity if the container has the capacity.

TryReleaseCapacity ( bool isRetryRequest, RetryCapacity retryCapacity ) : void

This method calls a method to release capacity back based on whether it was a successful response or a successful retry response. This is invoked by a retry request response.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Private Methods

Méthode Description
AddNewRetryCapacity ( string serviceURL ) : RetryCapacity
ReleaseCapacity ( int capacity, RetryCapacity retryCapacity ) : void

This method releases capacity back. This is invoked by the TryReleaseCapacity method.

TryGetRetryCapacity ( string key, RetryCapacity &value ) : bool

Method Details

CapacityManager() public méthode

public CapacityManager ( int throttleRetryCount, int throttleRetryCost, int throttleCost ) : System
throttleRetryCount int
throttleRetryCost int
throttleCost int
Résultat System

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

GetRetryCapacity() public méthode

Ths method fetches the RetryCapacity for the given ServiceURL from CapacityManager.CapacityContainer
public GetRetryCapacity ( string serviceURL ) : RetryCapacity
serviceURL string
Résultat RetryCapacity

TryAcquireCapacity() public méthode

This method acquires a said retry capacity if the container has the capacity.
public TryAcquireCapacity ( RetryCapacity retryCapacity ) : bool
retryCapacity RetryCapacity Contains the RetryCapacity object for the said ServiceURL.
Résultat bool

TryReleaseCapacity() public méthode

This method calls a method to release capacity back based on whether it was a successful response or a successful retry response. This is invoked by a retry request response.
public TryReleaseCapacity ( bool isRetryRequest, RetryCapacity retryCapacity ) : void
isRetryRequest bool
retryCapacity RetryCapacity Contains the RetryCapacity object for the said ServiceURL.
Résultat void