EditorPersistenceSession class final

Coordinates durable saves and recovery while rejecting stale completions.

Constructors

EditorPersistenceSession({required String documentId, required EditorDocumentStore store, DateTime now()?})

Properties

documentId → String
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
savedRevision → int?
Most recent revision whose durable write completed successfully.
no setter
store → EditorDocumentStore
final

Methods

cancel() → void
Invalidates outstanding operations.
checkpoint(TextDocument document, {required int revision, Map<String, Object?> metadata = const {}}) → Future<bool>
Writes recovery state without changing the durable saved revision.
isDirty(int revision) → bool
Whether revision differs from the most recently saved revision.
load() → Future<EditorDocumentSnapshot?>
Loads durable state unless superseded by a newer session operation.
loadRecovery() → Future<EditorDocumentSnapshot?>
Loads recovery state without marking it as durably saved.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save(TextDocument document, {required int revision, Map<String, Object?> metadata = const {}}) → Future<bool>
Saves document and clears obsolete recovery state.
toString() → String
A string representation of this object.
inherited

Operators

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