Classes · @purista/core
PendingInvocationRegistry
Registry for command invocations awaiting correlated responses.
Signature
class PendingInvocationRegistry<T> Constructors
1 entry
constructor
Constructor
new constructor<T>(options: { onLateResponse: (correlationId: string) => void; retentionMs: number }) Accessors
1 entry
size
Member
size Methods
6 entries
clear
Method
clear(): void Clear pending and timed-out entries without resolving callers.
getPendingMap
Method
getPendingMap(): Map<string, PendingInvocation<T>> Exposes the pending map for low-level bridge diagnostics.
register
Method
register(correlationId: string, timeoutMs: number, traceId: string | undefined): Promise<T> Register one invocation and reject it automatically after `timeoutMs`.
reject
Method
reject(correlationId: string, error: unknown): "rejected" | "late" | "missing" Reject a pending invocation or classify the response as late/missing.
rejectAll
Method
rejectAll(error: unknown): void Reject all pending invocations, typically during bridge shutdown.
resolve
Method
resolve(correlationId: string, payload: T): "late" | "missing" | "resolved" Resolve a pending invocation or classify the response as late/missing.