import type { SimEvent } from '../../types/events.ts'; import { ComponentType } from '../../types/components.ts'; import type { SimComponent, SimContext, ComponentConfig, ComponentMetrics } from '../../types/components.ts'; import type { ServerConfig } from '../../types/configs.ts'; /** * Server component: processes work units with configurable service time, * concurrency limits, load-dependent latency, and failure state handling. * * Has no internal queue — rejects arrivals when all concurrency slots are full. * Use an explicit Queue component upstream for buffering. */ export declare class Server implements SimComponent { readonly id: string; readonly type = ComponentType.SERVER; readonly config: ComponentConfig; private serverConfig; private activeCount; private crashed; private latencySpikeMultiplier; private cpuReductionPercent; private errorRate; private tpsProcessed; private totalRejected; constructor(id: string, serverConfig: ServerConfig); handleEvent(event: SimEvent, context: SimContext): SimEvent[]; private handleArrival; private handleDeparture; private startProcessing; private computeServiceTime; private getEffectiveConcurrencyLimit; private getUtilization; private recordUtilization; setCrashed(crashed: boolean): void; setLatencySpike(multiplier: number): void; setCpuReduction(reductionPercent: number): void; setErrorRate(rate: number): void; getMetrics(): ComponentMetrics; reset(): void; } //# sourceMappingURL=server.d.ts.map