import Directory from "./directory"; import Message from "./message"; import Vertex from "./vertex"; export interface IExecutorOptions { maxParallelism?: number; maxMessageScanDepth?: number; maxUncommittedAgeMS?: number; } export default class Executor { static readonly MAX_UNCOMMITTED_AGE_DEFAULT: number; static readonly SCHEDULE_MIN_INTERVAL = 1000; static startTime: number; id: string; directory: Directory; protected vertexTypes: { [id: string]: typeof Vertex; }; messages: { [vertexType: string]: { [vertexId: string]: Message[]; }; }; messagesQueued: number; vertices: { [vertexId: string]: Vertex; }; uncommittedVertices: { [vertexId: string]: Vertex; }; protected scheduleQueued: boolean; protected vertexBusy: { [vertexId: string]: boolean; }; protected maxParallelism: number | undefined; protected maxMessageScanDepth: number | undefined; protected maxUncommittedAgeMS: number; lastStatsDisplay: number; statistics: any; constructor(options: IExecutorOptions); activate(vertexId: string): Promise>; get(vertexId: string): Promise>; commit(vertex: Vertex): Promise>; deactivate(vertexId: string): Promise>; register(vertexClass: any): void; send(messages: Message[]): Promise; protected triggerSchedule(): Promise; protected atMaxParallelism(): boolean; protected processAndEmit(vertex: Vertex, message: Message): Promise>; protected scheduleMessages(): Promise<{ [id: string]: Promise>; }>; protected scheduleCommits(): Promise<{ [id: string]: Promise>; }>; protected scheduleDeactivations(): Promise<{ [id: string]: Promise>; }>; protected displayStats(): void; protected retirePromises(promises: { [id: string]: Promise>; }): Promise; protected schedule(): Promise<[void, void, void]>; }