Private
isPrivate
readyIndicates if there is currently no exclusive operation executed
true
If no exclusive lock is hold
Waits on the previously requested operation and calls the doneCallback if the operation is fulfilled
A promise which completes successfully, when the previously requested operation completes
Optional
doneCallback: ((this: Lockable) => any)The callback which will be invoked when the previously operations on this object is completed.
Optional
failCallback: ((error: Error) => any)When the lock can't be released caused by a none recoverable error
Protected
withProtected
Try to aquire an exclusive lock and executes the given callback.
A promise
If the lock can't be aquired
The exclusive operation to execute
Optional
critical: boolean = falseIndicates if the operation is critical. If the operation is critical and the operation fails, then the lock will not be released
Generated using TypeDoc
This base class provides an lock interface to execute exclusive operations