SharedMemoryStorage class final

One in-memory "file" that several WalPack handles can open at once, to test multi-process behaviour (live sync(), watch(), OCC conflicts, peer compaction) without touching the disk. Works on every platform.

final storage = SharedMemoryStorage();
final a = await WalPack.open(
  backend: storage.openBackend(),
  options: WalPackOptions(lockStrategy: storage.openLock()),
);
final b = await WalPack.open(
  backend: storage.openBackend(),
  options: WalPackOptions(lockStrategy: storage.openLock()),
);

Constructors

SharedMemoryStorage({Uint8List? initialBytes})
Creates shared storage, optionally seeded with container initialBytes.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openBackend() → StorageBackend
Opens a new backend view; each WalPack handle needs its own.
openLock() → LockStrategy
Opens a new lock strategy; each WalPack handle needs its own.
toBytes() → Uint8List
Current container bytes.
toString() → String
A string representation of this object.
inherited

Operators

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