InMemorySessionStore class final
In-memory implementation of persistent session store.
- Implemented types
- Annotations
-
- @experimental
Constructors
- InMemorySessionStore({bool rejectBranchingSessions = false})
- Creates an in-memory store.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- rejectBranchingSessions → bool
-
Whether a branched
sessionIdlookup is rejected instead of resolving to the most-recent leaf.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getLatestSnapshotMetadata(
String sessionId, {Map< String, dynamic> ? context}) → Future<SessionSnapshot?> -
SessionStore.getSnapshot by
sessionId(the session's latest leaf) without the state: the same resolution, the same null-if-none contract, and a row withstatenull. The resolvedsessionIdis carried on the returned row even for a row that stored it only understate.override -
getSnapshot(
{String? snapshotId, String? sessionId, Map< String, dynamic> ? context}) → Future<SessionSnapshot?> -
Loads a snapshot either by its
snapshotIdor bysessionId.override -
getSnapshotMetadata(
String snapshotId, {Map< String, dynamic> ? context}) → Future<SessionSnapshot?> -
SessionStore.getSnapshot by
snapshotIdwithout the state: the returned row carries every other field as stored, withstatenull, and the same null-if-not-found contract.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onSnapshotStateChange(
String snapshotId, void callback(SessionSnapshot snapshot), {Map< String, dynamic> ? context}) → void Function()? -
Registers
callbackfor state changes tosnapshotId. Returns an unsubscribe function, ornullif not supported.override -
saveSnapshot(
String? snapshotId, SnapshotMutator mutator, {Map< String, dynamic> ? context}) → Future<String?> -
Atomically reads the current snapshot (if
snapshotIdis provided), passes it tomutator, and persists the result.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited