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
-
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
WalPackhandle needs its own. -
openLock(
) → LockStrategy -
Opens a new lock strategy; each
WalPackhandle 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