SyncPhase enum

The high-level phase of a sync round-trip.

The transitions are:

starting
  → pushing
      → retrying (back to pushing)
      → pulling
          → applying
              → retrying (back to applying)
              → done | error

done and error are terminal — the next syncAsync call starts a new round-trip from starting.

Inheritance
Available extensions

Values

starting → const SyncPhase

The queue is being read (either from the in-memory cache or the persistent SyncQueueStore). One event, then transition to pushing.

pushing → const SyncPhase

Local changes are being sent to the SyncProvider. processed is the number of local changes pushed so far; total is the total number to push.

pulling → const SyncPhase

The remote envelope is being received. processed is the number of remote changes received so far; total is usually null (we don't know the count until the response is fully received).

applying → const SyncPhase

Remote changes are being applied to the local DB. processed is the number applied so far; total is the number to apply (the size of the remote envelope).

retrying → const SyncPhase

Between retry attempts. processed is the attempt count, total is the max-attempts from the RetryPolicy. The next event is back to pushing or applying.

done → const SyncPhase

Terminal: the sync succeeded. processed == total (always).

error → const SyncPhase

Terminal: the sync failed. The error and stackTrace fields of SyncProgress are set.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

Constants

values → const List<SyncPhase>
A constant List of the values in this enum, in order of their declaration.