C# Класс Amazon.Runtime.Internal.CapacityManager

This class is responsible for keeping track of Retry capacity across different ServiceURLs.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Приватные методы

Метод Описание
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

Описание методов

CapacityManager() публичный Метод

public CapacityManager ( int throttleRetryCount, int throttleRetryCost, int throttleCost ) : System
throttleRetryCount int
throttleRetryCost int
throttleCost int
Результат System

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

GetRetryCapacity() публичный Метод

Ths method fetches the RetryCapacity for the given ServiceURL from CapacityManager.CapacityContainer
public GetRetryCapacity ( string serviceURL ) : RetryCapacity
serviceURL string
Результат RetryCapacity

TryAcquireCapacity() публичный Метод

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.
Результат bool

TryReleaseCapacity() публичный Метод

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.
Результат void