CacheLockProvider Class
A lock provider that leverages the cache to create semaphores
Constructor
CacheLockProvider
()
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 optional
-
-
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