/** * In-memory HeadRegistry implementation. * * Preserves the existing HeadRegistry behavior (pure in-memory, no disk I/O) * while conforming to the IHeadRegistry interface. Mutating methods return * resolved Promises for interface compatibility with persistent implementations. * * Use `createIsolated()` for test scenarios that need an independent registry. */ import type { DeferredHeadUpdate, IHeadRegistry } from '../interfaces/storage/headRegistry'; import type { HeadRecord } from '../interfaces/storage/headRegistryDriver'; export declare class InMemoryHeadRegistry implements IHeadRegistry { private readonly heads; private readonly timestamps; private readonly deferred; private readonly changeListeners; private makeKey; getHead(dbName: string, collectionName: string): string | undefined; setHead(dbName: string, collectionName: string, blockId: string): Promise; removeHead(dbName: string, collectionName: string): Promise; clear(): Promise; load(): Promise; getAllHeads(): Map; getHeadTimestamp(dbName: string, collectionName: string): Date | undefined; mergeHeadUpdate(dbName: string, collectionName: string, blockId: string, timestamp: Date): Promise; private notifyHeadChange; onHeadChange(dbName: string, collectionName: string, callback: (blockId: string) => void): () => void; deferHeadUpdate(dbName: string, collectionName: string, blockId: string, timestamp: Date): Promise; applyDeferredUpdates(blockId: string): Promise; getDeferredUpdates(): DeferredHeadUpdate[]; exportSnapshot(): ReadonlyMap; mergeSnapshot(snapshot: Iterable): Promise<{ merged: number; skipped: number; }>; /** * Factory method that creates an independent InMemoryHeadRegistry instance. * Useful for tests that need isolated state. */ static createIsolated(): InMemoryHeadRegistry; } //# sourceMappingURL=inMemoryHeadRegistry.d.ts.map