@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.
17 lines (16 loc) • 631 B
TypeScript
/**
* @module Lock
*/
import type { TimeSpan } from "../../../../utilities/_module-exports.js";
import type { IDatabaseLockAdapter, ILockAdapter } from "../../../../lock/contracts/_module-exports.js";
/**
* @internal
*/
export declare class DatabaseLockAdapter implements ILockAdapter {
private readonly adapter;
constructor(adapter: IDatabaseLockAdapter);
acquire(key: string, owner: string, ttl: TimeSpan | null): Promise<boolean>;
release(key: string, owner: string): Promise<boolean>;
forceRelease(key: string): Promise<void>;
refresh(key: string, owner: string, ttl: TimeSpan): Promise<boolean>;
}