import { AsyncHandler } from './AsyncHandler'; /** * A wrapper handler that will only run the wrapped handler if it is executed from: * * when running multithreaded: either the **primary** or a **worker process** * * when running singlethreaded: **the only process** (i.e. always) */ export declare class ProcessHandler extends AsyncHandler { protected readonly source: AsyncHandler; protected readonly executeOnPrimary: boolean; protected isSingleThreaded: boolean; /** * Creates a new ProcessHandler * * @param source - The wrapped handler * @param executeOnPrimary - Whether to execute the source handler when the process is the _primary_ or a _worker_. */ constructor(source: AsyncHandler, executeOnPrimary: boolean); canHandle(input: TIn): Promise; handle(input: TIn): Promise; /** * Checks if the condition has already been fulfilled. */ protected canExecute(): boolean; }