DualWritePersistenceConfig class

A persistence layer that serves all reads from a primary backend while mirroring every write into a secondary backend, so a real workload (e.g. the functional pack) can be run once and the two resulting DB sets compared for logical identity afterwards.

The mirror is byte-exact, not operation-replayed: each write is applied to the primary, then the primary's resulting per-key state (data + metadata with its server-stamped createdAt/updatedAt, and its commit entry with its commit id) is copied verbatim into the secondary via restore / replay. Replaying the operation on the secondary instead would let each backend stamp its own timestamps and diverge.

Reads, capability flags, snapshots, and change events all come from the primary, so the server behaves exactly as if it were running on the primary backend alone.

Implemented types

Constructors

DualWritePersistenceConfig({required AtPersistenceConfig primary, required AtPersistenceConfig secondary})

Properties

accessLogPath String
Where the access log lives. Only consulted when enableAccessLog is true.
no setteroverride
backend AtPersistenceBackendId
The backend this config is for. Must match the AtPersistenceFactory.backendId you pass it to.
no setteroverride
backendMarkerPath String
Where the marker file lives. A future backend-aware factory will use this to detect backend changes between restarts; the current implementation doesn't read it, it's declared here so the field is part of the contract from day one.
no setteroverride
commitLogPath String
Where the commit log lives.
no setteroverride
enableAccessLog bool
Whether the access log should be initialised. Server-only — clients leave this false and never read the access log.
no setteroverride
enableCommitLog bool
Whether the keystore should be initialised with a commit log. Server bundles set this true (every write appends to the commit log for sync). Clients that no longer rely on a commit log leave it false, in which case the keystore is created commit-log-free and commitLogPath is never consulted.
no setteroverride
enableNotificationKeystore bool
Whether the notification keystore should be initialised as persistence. Server-only — clients leave this false and handle notifications via the at_lookup connection instead.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
notificationStoragePath String
Where the notification keystore lives. Only consulted when enableNotificationKeystore is true.
no setteroverride
primary AtPersistenceConfig
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secondary AtPersistenceConfig
final
storagePath String
Where the keystore data lives.
no setteroverride

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited