import { SlaveSystem } from "../slave/SlaveSystem"; import { ParallelSystemArrayMediator } from "./ParallelSystemArrayMediator"; import { ParallelSystemArray } from "./ParallelSystemArray"; import { ParallelSystem } from "./ParallelSystem"; import { DistributedSystemArrayMediator } from "../distributed/DistributedSystemArrayMediator"; import { DistributedSystemArray } from "../distributed/DistributedSystemArray"; import { DistributedSystem } from "../distributed/DistributedSystem"; import { Invoke } from "../../protocol/invoke/Invoke"; /** * A mediator, the master driver. * * The {@link MediatorSystem} is an abstract class helping {@link ParallelSystemArrayMediator} can be a **slave** * system. The {@link MediatorSystem} interacts and communicates with the **master** system as a role of **slave**. * * This {@link MediatorSystem} object is created in {@link ParallelSystemArrayMediator.createMediator}. Override the * method and return one of them, which are derived from this {@link MediatorSystem} class, considering which * type and protocol the **master** system follows: * * - A client slave connecting to master server: * - {@link MediatorClient} * - {@link MediatorWebClient} * - {@link MediatorSharedWorkerClient} * - A server slave accepting master client: * - {@link MediatorServer} * - {@link MediatorWebServer} * - {@link MediatorDedicatedWorkerServer} * - {@link MediatorSharedWorkerServer} * * When the **master** orders a *parallel process* to this **slave**, then the {@link MediatorSystem} delivers the * *parallel process* to its parent {@link ParallelSystemArrayMediator} object. The * {@link ParallelSystemArrayMediator} object distributes the *parallel process* to its slaves system, * {@link ParallelSystem} objects. When the *parallel process* has completed, then {@link MediatorSystem} reports the * result to its **master**. * * * * * * @handbook [Templates - Parallel System](https://github.com/samchon/framework/wiki/TypeScript-Templates-Parallel_System), * [Distributed System](https://github.com/samchon/framework/wiki/TypeScript-Templates-Distributed_System) * @author Jeongho Nam */ export declare abstract class MediatorSystem extends SlaveSystem { /** * @hidden */ private system_array_; /** * @hidden */ private progress_list_; /** * Construct from parent {@link ParallelSystemArrayMediator} object. * * @param systemArray The parent {@link ParallelSystemArrayMediator} object. */ constructor(systemArray: ParallelSystemArrayMediator); /** * Construct from parent {@link DistributedSystemArrayMediator} object. * * @param systemArray The parent {@link DistributedSystemArrayMediator} object. */ constructor(systemArray: DistributedSystemArrayMediator); /** * Start interaction. * * The {@link start start()} is an abstract method starting interaction with the **master** system. If the * **master** is a server, then connects to the **master**. Otherwise, the **master** is client, then this * {@link MediatorSystem} object wil open a server accepting the **master**. */ abstract start(): void; /** * Get parent {@link ParallelSystemArrayMediator} or {@link DistributedSystemArrayMediator} object. */ getSystemArray(): ParallelSystemArrayMediator | DistributedSystemArrayMediator; /** * Get parent {@link ParallelSystemArrayMediator} object. */ getSystemArray>(): SystemArray; /** * Get parent {@link DistributedSystemArrayMediator} object. */ getSystemArray>(): SystemArray; /** * @hidden */ private _Complete_history; /** * @hidden */ protected _Reply_data(invoke: Invoke): void; /** * @inheritdoc */ replyData(invoke: Invoke): void; }