This NoOpLockAdapter will do nothing and is used for easily mocking ILockProvider for testing.
NoOpLockAdapter
ILockProvider
IMPORT_PATH: "@daiso-tech/core/lock/adapters"
"@daiso-tech/core/lock/adapters"
The acquire method acquires a lock only if expired.
acquire
Returns true if expired otherwise false is returned.
true
false
The forceRelease method releases a lock regardless of the owner.
forceRelease
Returns true if the lock exists or false if the lock is expired.
The refresh method will upadte ttl of lock if it matches the owner and is expireable.
refresh
ttl
owner
Returns false if the lock is unexpireable, the is expired, does not match the owner otherwise true is returned.
The release method releases a lock if the owner matches.
release
Returns true if released otherwise false is returned.
This
NoOpLockAdapter
will do nothing and is used for easily mockingILockProvider
for testing.IMPORT_PATH:
"@daiso-tech/core/lock/adapters"