The NoOpLockAdapter will do nothing and is used for easily mocking ILockFactory for testing.

IMPORT_PATH: "@daiso-tech/core/lock/no-op-lock-adapter"

Implements

Constructors

Methods

  • Forcibly releases a lock regardless of ownership. Used for emergency lock release or administrative cleanup. Bypasses ownership verification for situations where the owner is unavailable.

    Parameters

    Returns Promise<boolean>

    Promise resolving to true if lock existed and was released, false if lock is already expired

  • Refreshes (extends) the time-to-live of an existing lock. Only succeeds if all conditions are met: ownership matches, lock hasn't expired, and it's expirable.

    Parameters

    Returns Promise<boolean>

    Promise resolving to true if refresh succeeded, false if lock is unexpirable, expired, or not owned by lockId

  • Releases a lock if owned by the specified lockId. Ownership verification prevents accidental release of locks held by others.

    Parameters

    Returns Promise<boolean>

    Promise resolving to true if lock was successfully released, false if not owned by lockId or doesn't exist