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; interface ScheduleTaskParams { category: TFC; error: HMSException; task: RetryTask; originalState: TransportState; maxFailedRetries?: 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, sendEvent: (error: HMSException, category: TFC) => void); schedule({ category, error, task, originalState, maxFailedRetries, changeState, }: ScheduleTaskParams): Promise; reset(): void; isTaskInProgress(category: TFC): boolean; private scheduleTask; private getBaseDelayForTask; private getDelayForRetryCount; private setTimeoutPromise; } export {};