/** * DriverBackedHeadRegistry — IHeadRegistry implemented on top of IHeadRegistryDriver. * * Holds an in-memory cache for reads (getHead is synchronous per the interface). * Every mutation writes only the affected key via the driver (O(1) per write). * load() hydrates the cache by listing all keys and reading each one. * * This replaces both PersistentHeadRegistry (single-JSON-file on disk) and * CloudHeadRegistry (single-JSON-blob in cloud), which both did a full * serialize-all-heads rewrite on every mutation. */ import type { IWriteProof } from '../interfaces/auth/writeProof'; import type { DeferredHeadUpdate, IHeadRegistry } from '../interfaces/storage/headRegistry'; import type { HeadRecord, IHeadRegistryDriver } from '../interfaces/storage/headRegistryDriver'; export declare class DriverBackedHeadRegistry implements IHeadRegistry { private readonly heads; private readonly timestamps; private readonly deferred; private readonly changeListeners; protected readonly driver: IHeadRegistryDriver; constructor(driver: IHeadRegistryDriver); private makeKey; getHead(dbName: string, collectionName: string): string | undefined; setHead(dbName: string, collectionName: string, blockId: string, _writeProof?: IWriteProof): Promise; removeHead(dbName: string, collectionName: string, _writeProof?: IWriteProof): 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; }>; } //# sourceMappingURL=driverBackedHeadRegistry.d.ts.map