/** * @module lru-map * @category Internal * * Tiny bounded LRU map / set built on insertion-ordered `Map`. Used to cap * memory in long-running orchestrators that mint large numbers of keys — * notably: * * - {@link InMemoryCache}: stream → state checkpoint * - `Act._subscribed_streams`: stream → presence (LruSet) * * Apps with millions of dynamic streams (one target per aggregate) can't * afford an unbounded `Set` — eviction is required. * * @internal */ /** * Bounded LRU map. `get()` promotes; `has()` does not. `set()` always * promotes and evicts the oldest entry when at capacity. * * @internal */ export declare class LruMap { private readonly _entries; private readonly _max_size; constructor(maxSize: number); get(key: K): V | undefined; has(key: K): boolean; set(key: K, value: V): void; delete(key: K): boolean; clear(): void; get size(): number; } /** * Bounded LRU set built on top of {@link LruMap}. `has()` does not promote; * `add()` does (re-inserting if already present, evicting the oldest at * capacity). * * @internal */ export declare class LruSet { private readonly _map; constructor(maxSize: number); has(value: T): boolean; add(value: T): void; delete(value: T): boolean; clear(): void; get size(): number; } //# sourceMappingURL=lru-map.d.ts.map