The acquire method acquires a lock only if the lock is not already acquired. Returns true if not already acquired othewise false is returned.
The refresh method will upadte ttl of lock if it matches the given key and matches the given owner. Returns true if the update occured otherwise false is returned.
The withGroup method returns a new IDatabaseLockAdapter instance that groups locks together. Only locks in the same group will be acquired and released, leaving locks outside the group unaffected.
Note the MemoryLockAdapter is limited to single process usage and cannot be shared across multiple servers or different processes. This adapter is meant to be used for testing.
IMPORT_PATH:
"@daiso-tech/core/lock/implementations/adapters"