import type { BatchJobConfig } from './batch-scheduler-types.js';
import { JobQueue } from './job-queue.js';
import { RetryManager } from './retry-manager.js';
export interface BatchJobExecutionCoordinatorDeps {
    jobQueue: JobQueue;
    retryManager: RetryManager;
    getConfig: () => BatchJobConfig;
    getIsRunning: () => boolean;
    lastExecution: Map<string, Date>;
    totalExecutions: Map<string, number>;
    lastJobRunMeta: Map<string, {
        at: Date;
        success: boolean;
        durationMs: number;
    }>;
    writeDiagnosticsEvent: (event: Record<string, unknown>) => Promise<void>;
    log: (message: string, data?: unknown, level?: 'info' | 'warn' | 'error') => void;
    checkSchedulerHealth: () => Promise<void>;
}
/**
 * 큐·재시도·타임아웃·진단 이벤트를 한 곳에서 처리해 BatchScheduler 본문을 얇게 유지한다.
 */
export declare class BatchJobExecutionCoordinator {
    private readonly deps;
    constructor(deps: BatchJobExecutionCoordinatorDeps);
    addJobToQueue(name: string, job: () => Promise<void>, priority: number, retryCount?: number): boolean;
    /**
     * `addJob` 직후 큐 선두가 해당 작업이면 즉시 한 번 실행을 시도한다.
     */
    afterEnqueueAttempt(name: string, added: boolean, jobProcessorInterval: ReturnType<typeof setInterval> | null): void;
    startJobProcessor(): ReturnType<typeof setInterval>;
    executeJobWithRetry(name: string, job: () => Promise<void>, priority: number, initialRetryCount?: number): Promise<void>;
    private executeWithTimeout;
}
//# sourceMappingURL=batch-job-execution-coordinator.d.ts.map