SynquillStorageConfig class
Base class for synced data storage configuration.
Constructors
- SynquillStorageConfig({Dio? dio, int foregroundQueueConcurrency = 1, int backgroundQueueConcurrency = 2, DataSavePolicy? defaultSavePolicy = DataSavePolicy.localFirst, DataLoadPolicy? defaultLoadPolicy = DataLoadPolicy.localThenRemote, Duration initialRetryDelay = const Duration(seconds: 2), Duration maxRetryDelay = const Duration(minutes: 30), double backoffMultiplier = 2.0, double jitterPercent = 0.2, int maxRetryAttempts = 50, Duration foregroundPollInterval = const Duration(seconds: 5), Duration backgroundPollInterval = const Duration(minutes: 5), Duration minRetryDelay = const Duration(seconds: 1), bool recordRequestBody = false, bool recordResponseBody = false, bool recordRequestHeaders = false, bool recordResponseHeaders = false, Duration foregroundQueueCapacityTimeout = const Duration(seconds: 10), Duration loadQueueCapacityTimeout = const Duration(seconds: 5), Duration backgroundQueueCapacityTimeout = const Duration(seconds: 2), Duration queueCapacityCheckInterval = const Duration(milliseconds: 100), Duration maximumNetworkTimeout = const Duration(seconds: 20), int maxForegroundQueueCapacity = 50, int maxLoadQueueCapacity = 50, int maxBackgroundQueueCapacity = 50})
-
Creates a new SynquillStorageConfig.
const
Properties
- backgroundPollInterval → Duration
-
Polling interval when app is in background.
final
- backgroundQueueCapacityTimeout → Duration
-
Timeout for background queue when waiting for capacity.
Defaults to 2 seconds for background operations.
final
- backgroundQueueConcurrency → int
-
The concurrency level for the localFirst request queue. Defaults to 2.
final
- backoffMultiplier → double
-
Backoff multiplier for exponential retry delays.
final
- defaultLoadPolicy → DataLoadPolicy?
-
Default data load policy for all repositories.
If null, defaults to DataLoadPolicy.localThenRemote.
final
- defaultSavePolicy → DataSavePolicy?
-
Default data save policy for all repositories.
If null, defaults to DataSavePolicy.localFirst.
final
- dio → Dio?
-
Optional Dio client for network requests.
If null, an internal default client will be configured.
Optional Dio client for network requests.
If null, an internal default client will be configured.
final
- foregroundPollInterval → Duration
-
Adaptive polling intervals
Polling interval when app is in foreground.
final
- foregroundQueueCapacityTimeout → Duration
-
Queue capacity management timeouts
Timeout for foreground queue when waiting for capacity.
Defaults to 10 seconds for critical user operations.
final
- foregroundQueueConcurrency → int
-
The concurrency level for the remoteFirst request queue. Defaults to 1.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialRetryDelay → Duration
-
Retry configuration
Initial retry delay for failed sync operations.
final
- jitterPercent → double
-
Jitter percentage (0.0 to 1.0) to add randomness to retry delays.
final
- loadQueueCapacityTimeout → Duration
-
Timeout for load queue when waiting for capacity.
Defaults to 5 seconds for UI-related operations.
final
- maxBackgroundQueueCapacity → int
-
Maximum queue capacity for background operations.
Defaults to 50 to prevent memory issues.
final
- maxForegroundQueueCapacity → int
-
Maximum queue capacity for foreground operations.
Defaults to 50 to prevent memory issues.
final
- maximumNetworkTimeout → Duration
-
Maximum network timeout for HTTP requests.
final
- maxLoadQueueCapacity → int
-
Maximum queue capacity for load operations.
Defaults to 50 to prevent memory issues.
final
- maxRetryAttempts → int
-
Maximum number of retry attempts before marking task as dead.
final
- maxRetryDelay → Duration
-
Maximum retry delay for failed sync operations.
final
- minRetryDelay → Duration
-
Minimum retry delay to prevent excessive CPU usage.
final
- queueCapacityCheckInterval → Duration
-
Interval for checking queue capacity during wait.
Defaults to 100 milliseconds.
final
- recordRequestBody → bool
-
Whether to record HTTP request bodies in logs/debugging.
Defaults to false.
final
- recordRequestHeaders → bool
-
Whether to record HTTP request headers in logs/debugging.
Defaults to false.
final
- recordResponseBody → bool
-
Whether to record HTTP response bodies in logs/debugging.
Defaults to false.
final
- recordResponseHeaders → bool
-
Whether to record HTTP response headers in logs/debugging.
Defaults to false.
final
- 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