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.
Note the
MemorySemaphoreAdapteris limited to single process usage and cannot be shared across multiple servers or different processes. This adapter is meant to be used for testing.IMPORT_PATH:
"@daiso-tech/core/semaphore/memory-semaphore-adapter"