CursorStore class abstract interface

Persistence for the firehose cursor: the sequence number (seq) of the last message a consumer finished processing.

A firehose consumer that does not persist its cursor restarts from the live edge of the stream, silently losing every event that occurred while it was down. Storing the cursor and passing it back on reconnect is what turns a restart into a gap-free resume.

The implementation is left to the caller — a file, SQLite, Redis, a row in the same database the consumer already writes to — matching the injection pattern used by OAuthStateStore, OAuthSessionStore and DPoPNonceCache. InMemoryCursorStore is provided for tests and short-lived processes.

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

delete() Future<void>
Discards the stored cursor so the next subscription starts from the live edge.
find() Future<int?>
Returns the stored cursor, or null when none has been stored yet (a first run, or after delete).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(int cursor) Future<void>
Stores cursor as the latest processed sequence number.
toString() String
A string representation of this object.
inherited

Operators

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