DbLockProvider Class
A lock provider that leverages the DB to create semaphores
Constructor
DbLockProvider
()
Methods
acquire
(
-
name
-
[options={}]
-
cb
Attempts to acquire the lock with the given name.
Parameters:
-
name
String -
[options={}]
Object optional-
[payload]
Object optional -
[timeout]
Integer optionalLock timeout in seconds
-
-
cb
Function
get
(
-
name
-
cb
Retrieves the payload for the lock
Parameters:
-
name
String -
cb
Function
release
(
-
name
-
[options={}]
-
cb
Releases the lock
Parameters:
-
name
String -
[options={}]
Object optional -
cb
Function