Classes · @purista/core

PendingInvocationRegistry

Registry for command invocations awaiting correlated responses.

Signature

PendingInvocationRegistry.ts typescript
class PendingInvocationRegistry<T>

Constructors

1 entry

constructor

Constructor

Source
constructor.ts typescript
new constructor<T>(options: { onLateResponse: (correlationId: string) => void; retentionMs: number })

Accessors

1 entry

size

Member

Source
size.ts typescript
size

Methods

6 entries

clear

Method

Source
clear.ts typescript
clear(): void

Clear pending and timed-out entries without resolving callers.

getPendingMap

Method

Source
getPendingMap.ts typescript
getPendingMap(): Map<string, PendingInvocation<T>>

Exposes the pending map for low-level bridge diagnostics.

register

Method

Source
register.ts typescript
register(correlationId: string, timeoutMs: number, traceId: string | undefined): Promise<T>

Register one invocation and reject it automatically after `timeoutMs`.

reject

Method

Source
reject.ts typescript
reject(correlationId: string, error: unknown): "rejected" | "late" | "missing"

Reject a pending invocation or classify the response as late/missing.

rejectAll

Method

Source
rejectAll.ts typescript
rejectAll(error: unknown): void

Reject all pending invocations, typically during bridge shutdown.

resolve

Method

Source
resolve.ts typescript
resolve(correlationId: string, payload: T): "late" | "missing" | "resolved"

Resolve a pending invocation or classify the response as late/missing.