import { TransportFailureCategory as TFC } from './models/TransportFailureCategory';
import { TransportState } from './models/TransportState';
import { HMSException } from '../error/HMSException';
/**
 * Task which is executed by [RetryScheduler.schedule] until max retry count
 * is reached.
 *
 * Any exception raised while executing the task assumes that task is failed.
 * Failed tasks are retried if max retry count is not reached.
 *
 * @returns True if the task if successful, otherwise False
 *
 *
 */
declare type RetryTask = () => Promise<boolean>;
interface ScheduleTaskParams {
    category: TFC;
    error: HMSException;
    task: RetryTask;
    originalState: TransportState;
    maxRetryTime?: number;
    changeState?: boolean;
}
export declare class RetryScheduler {
    private onStateChange;
    private sendEvent;
    private readonly TAG;
    private inProgress;
    private retryTaskIds;
    constructor(onStateChange: (state: TransportState, error?: HMSException) => Promise<void>, sendEvent: (error: HMSException, category: TFC) => void);
    schedule({ category, error, task, originalState, maxRetryTime, changeState, }: ScheduleTaskParams): Promise<void>;
    reset(): void;
    isTaskInProgress(category: TFC): boolean;
    private scheduleTask;
    private getDelayForRetryCount;
    private setTimeoutPromise;
}
export {};
