SnapshotIsolation class
Creates and manages snapshots for Rift boxes.
SnapshotIsolation provides MVCC-style snapshot isolation. Each snapshot captures a consistent point-in-time view of a box.
Constructors
- SnapshotIsolation({int maxSnapshotsPerBox = 10})
- Creates a SnapshotIsolation.
Properties
-
boxNames
→ Iterable<
String> -
All box names that have snapshots.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxSnapshotsPerBox ↔ int
-
Maximum snapshots to retain per box (default: 10).
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearAll(
) → void - Removes all snapshots across all boxes.
-
clearSnapshots(
String boxName) → void -
Removes all snapshots for
boxName. -
createSnapshot(
Box box) → Future< BoxSnapshotData> -
Creates a snapshot of the current state of
box. -
diff(
String boxName, int fromVersion, int toVersion) → SnapshotDiff? -
Computes the diff between two snapshot versions of
boxName. -
getLatestSnapshot(
String boxName) → BoxSnapshotData? -
Gets the latest snapshot for
boxName, or null if none exists. -
getSnapshot(
String boxName, int version) → BoxSnapshotData? -
Gets a snapshot for
boxNameat a specificversion. -
getSnapshots(
String boxName) → List< BoxSnapshotData> -
Gets all snapshots for
boxName. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeSnapshot(
String boxName, int version) → bool - Removes a specific snapshot.
-
snapshotCount(
String boxName) → int -
The number of snapshots for
boxName. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited