TtsrSessionSink class final

The host seam for session persistence the controller drives.

persistMessage mirrors the checkpoint sink (appends one in-memory message and bumps the host's persisted counter); persistInjection appends the ttsr-injection custom message plus the ttsr_injection record at the session leaf and bumps the counter by one (the in-memory injection message then counts as persisted).

Constructors

TtsrSessionSink({required Session? session(), required int persistedMessageCount(), required Future<void> persistMessage(Message message), required Future<void> persistInjection(String content, List<String> ruleNames)})
Creates a sink.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
persistedMessageCount int Function()
How many leading in-memory messages the host has already persisted.
final
persistInjection Future<void> Function(String content, List<String> ruleNames)
Persists the injection at the session leaf (custom message + record) and bumps the host's persisted counter by one.
final
persistMessage Future<void> Function(Message message)
Persists one in-memory message at the session leaf and bumps the host's persisted counter.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
session Session? Function()
The current session, or null when the host has none (the controller then degrades to in-memory injection only).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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