import type Redis from 'ioredis'; export declare const DEFAULT_LOCK_PREFIX = "authz:lock:"; export declare const DEFAULT_LOCK_TTL_SEC = 10; export declare const DEFAULT_BACKOFF_MS: number[]; export declare class DistributedLock { private readonly redis; private readonly prefix; constructor(redis: Redis, prefix?: string); /** SET key owner EX ttl NX → true if acquired. */ acquire(key: string, owner: string, ttlSec?: number): Promise; /** Release only if still owned (compare-and-delete, avoids deleting a re-acquired lock). */ release(key: string, owner: string): Promise; /** * Lock loser path: poll `read` with backoff, returning the first non-null result. * Returns null if all attempts are exhausted (→ caller falls back to a direct build). */ pollForResult(read: () => Promise, backoffMs?: number[]): Promise; } //# sourceMappingURL=distributed-lock.d.ts.map