/** * Entity cache for rclnodejs publishers, subscribers, and service clients. * * Lazily creates and caches DDS entities so repeated publishes to the same * topic reuse a single publisher, etc. Same pattern as the reference agents' * `_pubs`, `_subs`, `_srv_clients` maps. */ import type { Subscription } from "../types.js"; type Node = any; type MessageHandler = (msg: Record) => void; export declare class EntityCache { private publishers; private subscriptions; private serviceClients; /** * Get or create a cached publisher for the given topic and type. */ getPublisher(node: Node, topic: string, typeStr: string): any; /** * Subscribe to a topic. If already subscribed, adds the handler to the * existing subscription's handler set. Returns a Subscription handle. */ addSubscription(node: Node, topic: string, typeStr: string, handler: MessageHandler): Subscription; /** * Get or create a cached service client for the given service and type. */ getServiceClient(node: Node, service: string, typeStr: string): any; /** * Destroy all cached entities. Called during transport shutdown. */ destroyAll(node: Node): void; } export {}; //# sourceMappingURL=entities.d.ts.map