The acquire
method acquires a slot only if the slot limit is not reached.
Returns true if the slot limit is not reached otherwise false is returned.
The getState
method returns the state of the semaphore.
Returns ISemaphoreAdapterState
if the semaphore exists in the database or null if doesnt exists.
This
NoOpSemaphoreAdapter
will do nothing and is used for easily mockingISemaphoreProvider
for testing.IMPORT_PATH:
"@daiso-tech/core/semaphore/adapters"