import { Action, ClientSpecificActionKinds, IApplicationSpec, Reducer, ServerStoreAllowedActionKinds, ServerStoreState, SpecActions } from "../util"; import { IClient } from "./clients"; export declare abstract class ServerStore { private _store; private clients; private uniqueClients; protected readonly syncIntervalDurationMs: number; private syncInterval; /** Protocol version number. Used to check for mismatches between client & server versions. */ abstract readonly version: string; constructor(); dispose(): void; abstract getInitialServerState(): Pick; abstract getInitialClientState(clientId: string, state: ServerStoreState): Pick; abstract reduceL0: Reducer; abstract reduceL1: Reducer; abstract reduceL2: Reducer; abstract reduceL3: Reducer; handleL0(action: TSpec["actions"]["L0"]): void; handleL1(action: TSpec["actions"]["L1"]): void; handleL2(action: TSpec["actions"]["L2"], clientId: string): void; handleL3(action: TSpec["actions"]["L3"], clientId: string): void; handleReq(action: TSpec["actions"]["Req"], clientId: string): void; onClientConnected(client: IClient): void; onClientDisconnected(client: IClient): void; dispatchFromClient(action: Action, client: IClient): void; dispatch(action: SpecActions, clientId: string): void; dispatch(action: SpecActions>): void; addClient(client: IClient): void; removeClient(client: IClient): void; getState(): ServerStoreState; getL0State(): TSpec["state"]["L0"]; getL1State(): TSpec["state"]["L1"]; getL2State(clientId: string): TSpec["state"]["L2"]; getL3State(clientId: string): TSpec["state"]["L3"]; getClients(): Iterable; isEmpty(countNonHumans?: boolean): boolean; }