PersistentSetStorage class abstract interface

Storage used by PersistentSet.

transaction must serialize callbacks that target the same logical backend and key, including callbacks made through different storage handles. Before invoking the callback, it must load the latest available value into the supplied PersistentSetStorageTransaction. It must invoke the callback exactly once and keep the transaction locked until the callback's synchronous or asynchronous result completes, including when it fails.

read is a synchronous view of the last value observed by this storage handle. It must not perform platform I/O. Use transaction when an authoritative asynchronous read is needed. Values returned by either read method must be detached snapshots or otherwise safe for the caller to mutate without changing storage.

Writes and removals are intentionally available only through PersistentSetStorageTransaction, so callers cannot bypass the transaction boundary. An implementation that retains values passed to PersistentSetStorageTransaction.write must snapshot them before the returned future completes.

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
read(String key) List<String>?
toString() String
A string representation of this object.
inherited
transaction<R>(String key, FutureOr<R> action(PersistentSetStorageTransaction transaction)) Future<R>

Operators

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