class Aws::Plugins::Retries::RetryQuota
def checkout_capacity(error_inspector)
-
(Integer)
- The amount of capacity checked out
def checkout_capacity(error_inspector) @mutex.synchronize do capacity_amount = if error_inspector.networking? TIMEOUT_RETRY_COST else RETRY_COST end # unable to acquire capacity return 0 if capacity_amount > @available_capacity @available_capacity -= capacity_amount capacity_amount end end