The ILockAdapter contract defines a way for managing locks independent of the underlying technology. This contract is not meant to be used directly, instead you should use ILockProvider contract.
ILockAdapter
ILockProvider
IMPORT_PATH: "@daiso-tech/core/lock/contracts"
"@daiso-tech/core/lock/contracts"
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.
The
ILockAdapter
contract defines a way for managing locks independent of the underlying technology. This contract is not meant to be used directly, instead you should useILockProvider
contract.IMPORT_PATH:
"@daiso-tech/core/lock/contracts"