UiGraphSyncEngine class
Uploads dirty cache files to POST /embedded-agent/ui-graph.
Constructors
-
UiGraphSyncEngine({required SyncHost host, required UiGraphTransport transport, required Future<
String?> getAppUserId(), required String sdkName, required String sdkVersion, required String platform, required String appVersion(), bool isEnabled()?, int generation()?, String now()?, Duration syncDebounce = const Duration(seconds: 8), Duration heartbeat = const Duration(seconds: 60), int maxBatchBytes = 768 * 1024, Duration baseBackoff = const Duration(seconds: 5), Duration maxBackoff = const Duration(minutes: 5)})
Properties
- baseBackoff → Duration
-
final
- failures ↔ int
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- heartbeat → Duration
-
final
- maxBackoff → Duration
-
final
- maxBatchBytes → int
-
final
- permanentFailures ↔ int
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- successes ↔ int
-
Diagnostics only — never gates behaviour.
getter/setter pair
- syncDebounce → Duration
-
final
Methods
-
dispose(
) → void - Stops all three timers.
-
flush(
String reason) → Future< void> - Upload now, bypassing the debounce (screen handover, backgrounding).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyDirty(
) → void - Something became dirty.
-
start(
) → void - Start the heartbeat and immediately attempt a recovery pass for anything left dirty by a previous process.
-
syncNow(
String reason) → Future< void> - One full pass: collect dirty files, batch them, upload, CAS-mark.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- quarantineAfter → const int
- After this many consecutive payload rejections of the SAME content a file is quarantined: kept on disk and dirty, but no longer POSTed until its content changes (or the process restarts).