The acquireWriterBlocking method acquires a lock only if the key is not already acquired by different owner.
If the lock is not acquired, it retries every settings.interval until settings.time is reached.
Optionalsettings: SharedLockAquireBlockingSettingsReturns true if the lock is not already acquired otherwise false is returned.
The acquireWriterBlockingOrFail method acquires a lock only if the key is not already acquired by different owner.
If the lock is not acquired, it retries every settings.interval until settings.time is reached.
Throws an error if the lock is already acquired by different owner.
Optionalsettings: SharedLockAquireBlockingSettingsThe refreshWriterOrFail method updates the ttl of the lock if expireable and owned by the same owner.
Throws an error if the lock is not owned by same owner.
Throws an error if the key is unexpirable.
Optionalttl: ITimeSpanThe runWriterBlockingOrFail method wraps an Invokable or ITask with the acquireBlockingOrFail and release method.
Optionalsettings: SharedLockAquireBlockingSettings
IMPORT_PATH:
"@daiso-tech/core/shared-lock/contracts"