IMPORT_PATH: "@daiso-tech/core/shared-lock/contracts"
"@daiso-tech/core/shared-lock/contracts"
The acquireReader method acquires an slots only if the slot limit is not reached.
acquireReader
Returns true if the slot limit is not reached otherwise false is returned.
The acquireReaderOrFail method acquires an slots only if the slot limit is not reached. Throws an error if the slot limit is reached.
acquireReaderOrFail
The forceReleaseAllReaders method releases the all slots.
forceReleaseAllReaders
Returns true if the semaphore exists and has at least one unavailable slot or false if all slots are available.
The refreshReader method updates the ttl of the slot when acquired.
refreshReader
ttl
Optional
Returns true if the slot is refreshed otherwise false is returned.
The refreshReaderOrFail method updates the ttl of the slot when acquired. Throws an error if the slot is not acquired.
refreshReaderOrFail
The releaseReader method releases the current slot.
releaseReader
Returns true if the semaphore exists and has at least one busy slot or false.
The releaseReaderOrFail method releases the current slot. Throws an error if the slot is not acquired.
releaseReaderOrFail
The runReaderOrFail method wraps an Invokable with the acquireOrFail and release method.
runReaderOrFail
Invokable
acquireOrFail
release
IMPORT_PATH:
"@daiso-tech/core/shared-lock/contracts"