import type { Redis } from 'ioredis'; import type { IContainer } from 'node-cqrs'; import type { IObjectStorage, Identifier } from '../interfaces/index.ts'; import { AbstractRedisAccessor } from './AbstractRedisAccessor.ts'; /** * Redis-backed implementation of IObjectStorage. * * Each record is stored as a JSON string at key `{tableName}:{id}` with the shape * `{ "d": , "v": }`. The version field enables optimistic * concurrency control: `update` and `updateEnforcingNew` re-read the record after * the user callback runs and atomically commit only when the version still matches. * On mismatch the operation retries up to `maxRetries` times. */ export declare class RedisObjectStorage extends AbstractRedisAccessor implements IObjectStorage { #private; constructor(o: Partial> & { tableName: string; maxRetries?: number; }); protected initialize(_redis: Redis): void; get(id: Identifier): Promise; create(id: Identifier, data: TRecord): Promise; update(id: Identifier, update: (r: TRecord) => TRecord): Promise; updateEnforcingNew(id: Identifier, update: (r?: TRecord) => TRecord): Promise; delete(id: Identifier): Promise; }