HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/botocore/retries/__pycache__/quota.cpython-310.pyc
o

.&�a��@s dZddlZGdd�de�ZdS)zRetry quota implementation.


�Nc@s:eZdZdZedfdd�Zdd�Zdd�Zed	d
��ZdS)�
RetryQuotai�NcCs&||_||_|durt��}||_dS�N)�
_max_capacity�_available_capacity�	threading�Lock�_lock)�self�initial_capacity�lock�r�8/usr/lib/python3/dist-packages/botocore/retries/quota.py�__init__s

zRetryQuota.__init__cCsX|j�||jkr	Wd�dS|j|8_	Wd�dS1s%wYdS)z�Attempt to aquire a certain amount of capacity.

        If there's not sufficient amount of capacity available, ``False``
        is returned.  Otherwise, ``True`` is returned, which indicates that
        capacity was successfully allocated.

        NFT)rr)r	�capacity_amountrrr
�acquires

�$�zRetryQuota.acquirecCs\|j|jkrdS|j�t|j|j|�}|j|7_Wd�dS1s'wYdS)z�Release capacity back to the retry quota.

        The capacity being released will be truncated if necessary
        to ensure the max capacity is never exceeded.

        N)rrr�min)r	r�amountrrr
�release"s
�"�zRetryQuota.releasecCs|jSr)r)r	rrr
�available_capacity7szRetryQuota.available_capacity)	�__name__�
__module__�__qualname__�INITIAL_CAPACITYrrr�propertyrrrrr
rsr)�__doc__r�objectrrrrr
�<module>s