import Executor from "./executor"; import Message from "./message"; export interface IVertexOptions { id: string; executor: Executor; } export declare enum DuplicateMessagePolicy { ProcessAll = 1, ProcessLatestFromSender = 2 } export declare enum CommitPolicy { ShouldCommit = 1, NoCommit = 2, AlwaysCommit = 3 } export default class Vertex { static DEFAULT_LIFETIME: number; static VERTEX_TYPE: string; static VERTEX_ID_SEPARATOR: string; static duplicateMessagePolicy: DuplicateMessagePolicy; static makeId(vertexType: string, id: string): string; static typeFromId(id: string): string; static idFromId(id: string): string; id: string; expiration: number; commitPolicy: CommitPolicy; lastCommit: number; lifetime: number; committedHash: string; state: S; executor: Executor; constructor(options: IVertexOptions); activate(): Promise; commit(): Promise; hashState(): string; needsCommit(): boolean; deactivate(): Promise; expired(): boolean; process(message: Message): Promise; emit(message?: Message): Promise[]>; send(messages: Message[]): Promise; }