import { Fetcher, ModulatorFactory, Manager } from "../fetcher/index.js"; import { Condition } from "../condition/index.js"; import type { FetchedPage, Notifier } from "../fetcher/index.js"; import type { StrategyEvents, Ordered } from "./index.js"; export declare class OrderedStrategy { private members; private manager; private fetcher; private notifier; private readonly launchedRelations; private modulator; private fetchNotifier; private memberNotifier; private ordered; private polling; private toPoll; private pollInterval?; private canceled; private isEmitChecking; private shouldCheckEmitAgain; processingEmit: Promise; private isEndChecking; private shouldCheckEndAgain; processingCheckEnd: Promise; private logger; constructor(memberManager: Manager, fetcher: Fetcher, notifier: Notifier, factory: ModulatorFactory, ordered: Ordered, polling: boolean, pollInterval?: number); start(url: string, condition: Condition, root?: FetchedPage): Promise; cancel(): Promise; /** * This function implements the logic of a synchronized end checking loop that uses * the @isEndChecking and @shouldCheckEndAgain flags to prevent multiple end checking loops from running at the same time. * When a process is already running, subsequent calls simply set the shouldCheckEndAgain flag and return. * The original process then picks up these pending requests in its loop, * ensuring sequential execution without overlapping asynchronous operations */ private checkEnd; _checkEnd(): Promise; /** * Extracting basic information from the relation, according to the current configuration * Sorting in ascending order: if a relation comes in with a LT relation, then that relation is not important, because it can be handled later * Sorting in descending order: if a relation comes in with a GT relation, then that relation is not important, because it can be handled later */ private extractRelation; private handleFetched; /** * This function implements the logic of a synchronized emit loop that uses * the @isChecking and @shouldCheckAgain flags to prevent multiple emit loops from running at the same time. * When a process is already running, subsequent calls simply set the shouldCheckAgain flag and return. * The original process then picks up these pending requests in its loop, * ensuring sequential execution without overlapping asynchronous operations */ private checkEmit; /** * The actual emit loop. Maybe we can emit a member * only in the case when our current relation is important */ private _checkEmit; private emitIfNotOld; }