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.
The
ISemaphoreAdaptercontract defines a way for managing semaphores independent of the underlying technology. This contract is not meant to be used directly, instead you should useISemaphoreProvidercontract.IMPORT_PATH:
"@daiso-tech/core/semaphore/contracts"