Class SemaphoreKdfExecutionLimiter
java.lang.Object
com.svenruppert.jsentinel.credential.password.limiter.SemaphoreKdfExecutionLimiter
- All Implemented Interfaces:
KdfExecutionLimiter
KdfExecutionLimiter backed by a fair Semaphore.-
Nested Class Summary
Nested classes/interfaces inherited from interface KdfExecutionLimiter
KdfExecutionLimiter.Lease -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SemaphoreKdfExecutionLimiter
-
-
Method Details
-
acquire
Description copied from interface:KdfExecutionLimiterTries to acquire a KDF permit. Blocks up toKdfResourceBudget.maxWait()before giving up.- Specified by:
acquirein interfaceKdfExecutionLimiter- Returns:
- an
KdfExecutionLimiter.Leasethat must be released, orOptional.empty()when the limiter refused
-