SyncMetaDataRepo class abstract

Sync metadata repository

Responsible for storing feature-specific sync metadata such as the last sync checkpoint. Implementations may use an on-disk store, database, or an in-memory map (useful for tests).

Follows Dependency Inversion Principle (DIP) - high-level sync logic depends on this abstraction, not concrete storage implementations.

Implementers

Constructors

SyncMetaDataRepo()

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

areAllInitialSyncsCompleted(List<String> featureKeys) Future<bool>
Checks if all specified features have completed initial sync. More efficient than checking each feature individually. Returns true only if all features in featureKeys are completed.
getBackgroundSyncCheckpoint(String featureKey) Future<SyncCheckpoint?>
Returns the last checkpoint from a successful background sync for featureKey. Used for resumable, incremental syncing.
getInitialSyncCheckpoint(String featureKey) Future<SyncCheckpoint?>
Returns the last checkpoint from the initial sync process for featureKey.
isInitialSyncCompleted(String featureKey) Future<bool>
Returns whether the initial (critical) sync has been completed for featureKey. If true, initial sync may be skipped for that feature.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setInitialSyncCompleted(String featureKey, bool completed) Future<void>
Sets the initial sync completed flag for featureKey.
toString() String
A string representation of this object.
inherited
updateBackgroundSyncCheckpoint(String featureKey, SyncCheckpoint? checkpoint) Future<void>
Updates the last checkpoint from a successful background sync for featureKey. Stores (lastUpdatedAt, lastItemId) for deterministic pagination.
updateInitialSyncCheckpoint(String featureKey, SyncCheckpoint? checkpoint) Future<void>
Updates the last checkpoint used by the initial sync process for featureKey. This is kept separate from the background sync checkpoint to avoid conflicts.

Operators

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