Class PreemptionRequest


public class PreemptionRequest extends ObjectWithJsonToString
Declarative request to simulate a server preemption (Kubernetes node drain / Spot reclamation / a SIGTERM the platform sends before killing the pod): the server cordons itself (rejecting new exchanges), drains in-flight requests for a bounded window, and optionally signals HTTP/2 clients to stop with a GOAWAY. It is a simulation only and never actually stops the JVM or event loops; the cordon auto-clears after ttlMillis (a dead-man's switch) or on an explicit uncordon.

Server-scoped (there is no host key): preemption affects the whole MockServer instance. Held by the PreemptionSimulator singleton.

Follows the model field/withX/getter convention so it round-trips through Jackson without a bespoke (de)serializer.