UNPKG

@daiso-tech/core

Version:

The library offers flexible, framework-agnostic solutions for modern web applications, built on adaptable components that integrate seamlessly with popular frameworks like Next Js.

18 lines (17 loc) 728 B
/** * @module Lock */ import { type IDatabaseLockAdapter, type ILockAdapter, type ILockAdapterState } from "../../../../lock/contracts/_module.js"; import { type TimeSpan } from "../../../../time-span/implementations/_module.js"; /** * @internal */ export declare class DatabaseLockAdapter implements ILockAdapter { private readonly adapter; constructor(adapter: IDatabaseLockAdapter); acquire(key: string, lockId: string, ttl: TimeSpan | null): Promise<boolean>; release(key: string, lockId: string): Promise<boolean>; forceRelease(key: string): Promise<boolean>; refresh(key: string, lockId: string, ttl: TimeSpan): Promise<boolean>; getState(key: string): Promise<ILockAdapterState | null>; }