/** * CountDownLatch - Distributed countdown synchronization primitive. * Allows waiting until N events occur across distributed processes. */ import { CountDownResult, CountDownLatchStatus } from "../core/types"; export interface CountDownLatchManager { countDown: (latch: CountDownLatch, eventId?: string) => Promise; getStatus: (name: string) => Promise; await: (latch: CountDownLatch, timeoutMs?: number) => Promise; } export declare class CountDownLatch { readonly name: string; readonly targetCount: number; private readonly latchManager; private readonly options; constructor(name: string, targetCount: number, latchManager: CountDownLatchManager, options: { ttl: number; awaitTimeout: number; pollInterval: number; }); /** Get the configured poll interval */ get pollInterval(): number; /** Count down by 1. Returns result with remaining count. */ countDown(eventId?: string): Promise; /** Wait until count reaches 0 or timeout. Returns true if completed. */ await(timeoutMs?: number): Promise; /** Get current status */ getStatus(): Promise; } //# sourceMappingURL=countdown-latch.d.ts.map