SessionStorage class abstract interface

The storage contract behind a Session tree.

Ported from pi's SessionStorage interface. All operations are async so implementations can hit a real filesystem; failures surface as SessionException.

Implementers

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

appendEntry(SessionRecord record) → Future<void>
Appends record to the file and the in-memory index.
createEntryId() → Future<String>
Generates a record id that is unique within this storage.
findEntries(String type) → Future<List<SessionRecord>>
Returns all records of the given type, in file order.
getEntries() → Future<List<SessionRecord>>
Returns all records in file order.
getEntry(String id) → Future<SessionRecord?>
Looks up a record by id.
getLabel(String id) → Future<String?>
Returns the current label attached to the record id, if any.
getLeafId() → Future<String?>
Returns the id of the active leaf record, or null at the tree root.
getMetadata() → Future<SessionMetadata>
Returns the session metadata (from the file header).
getPathToRoot(String? leafId) → Future<List<SessionRecord>>
Walks from leafId to the tree root, returning records root-first.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setLeafId(String? leafId) → Future<void>
Persists a leaf record that moves the active leaf to leafId.
toString() → String
A string representation of this object.
inherited

Operators

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