Instance of ResourceLocker to use for acquiring a lock.
Time in ms after which the lock expires.
Protected
Readonly
expirationProtected
Readonly
lockerProtected
Readonly
loggerAs ReadWriteLocker.withReadLock but the locked function gets called with a maintainLock
callback function
to reset the lock expiration every time it is called.
The resulting promise will reject once the lock expires.
Identifier of the resource that needs to be locked.
A function to execute while the resource is locked. Receives a callback as input parameter to maintain the lock.
As ReadWriteLocker.withWriteLock but the locked function gets called with a maintainLock
callback function to reset the lock expiration every time it is called.
The resulting promise will reject once the lock expires.
Identifier of the resource that needs to be locked.
A function to execute while the resource is locked. Receives a callback as input parameter to maintain the lock.
Wraps around an existing ReadWriteLocker and adds expiration logic to prevent locks from getting stuck.