interface PooledIndexStore { close(): void; } type StoreFactory = (projectRoot: string, opts?: { indexDir?: string | undefined; }) => TStore; /** * Warm-connection pool for IndexStore instances. * * Each (projectRoot, indexDir) pair gets one persisted store. Every read * operation (search, stats, graph) acquires the store from the pool instead of * opening a fresh SQLite connection, re-parsing the schema, and re-preparing * statements. The connection stays warm between calls, subject to * {@link DEFAULT_MAX_WARM_STORES}. */ export declare class StorePool { private readonly createStore; private readonly maxWarmStores; private readonly stores; private readonly keyByStore; private clock; constructor(createStore: StoreFactory, maxWarmStores?: number); private key; /** Borrow a store. Creates it on first access for this key. */ acquire(projectRoot: string, opts?: { indexDir?: string | undefined; }): TStore; /** * Return the store to the pool. The connection stays warm for reuse, but the * pool may now close the least-recently-used *idle* connection to stay within * {@link maxWarmStores}. A store with outstanding refs is never closed. */ release(store: TStore): void; private trim; /** Close every pooled connection and drain the pool. Call on shutdown. */ closeAll(): void; /** Remove one store from the pool. Used by tests that need isolation. */ evict(projectRoot: string, indexDir?: string): void; /** True when the pool holds a connection for the given key. */ has(projectRoot: string, indexDir?: string): boolean; /** Number of warm connections currently held. */ get size(): number; } export {}; //# sourceMappingURL=writer-store-pool.d.ts.map