CustomManagerConfig<T extends DatumEntityInterface> class
A testing-only config to smuggle a mock manager into the creation process.
- Inheritance
-
- Object
- DatumConfig<
T> - CustomManagerConfig
Constructors
-
CustomManagerConfig(DatumManager<
T> mockManager) -
const
Properties
- autoStartSync → bool
-
Whether to automatically start auto-sync for all users with local data
upon initialization.
finalinherited
- autoSyncInterval → Duration
-
The interval for any automatic background synchronization.
finalinherited
- changeCacheCleanupInterval → Duration
-
The interval for periodic cleanup of the change cache.
This is in addition to the immediate cleanup based on changeCacheDuration.
finalinherited
- changeCacheDuration → Duration
-
The duration to keep a change ID in the cache to prevent duplicate processing.
finalinherited
- coldStartConfig → ColdStartConfig
-
Configuration for cold start synchronization behavior.
Determines how the system handles sync when the app is fully closed and reopened.
finalinherited
-
defaultConflictResolver
→ DatumConflictResolver<
T> ? -
The default conflict resolver to use if none is provided per-operation.
If null, LastWriteWinsResolver is used.
finalinherited
- defaultSyncDirection → SyncDirection
-
The default direction for synchronization.
finalinherited
-
defaultSyncOptions
→ DatumSyncOptions<
T> ? -
Default sync options to use when none are provided to synchronize().
These options will be merged with any options passed to individual sync calls.
finalinherited
- defaultUserSwitchStrategy → UserSwitchStrategy
-
The default strategy to use when switching users.
finalinherited
- deleteBehavior → DeleteBehavior
-
Defines the behavior for delete operations. Defaults to DeleteBehavior.hardDelete.
finalinherited
- enableLogging → bool
-
Whether to enable detailed logging from the Datum engine.
finalinherited
- enablePerformanceLogging → bool
-
Whether to enable performance logging for operations exceeding thresholds.
finalinherited
- errorRecoveryStrategy → DatumErrorRecoveryStrategy
-
The strategy for handling errors and retries during synchronization.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
initialUserId
→ Future<
String?> Function()? -
The user ID to target for the initial auto-sync if autoStartSync is
true. A function that returns a
Future<String?>to get the current user ID. If the function returns null, DatumManager will discover all users with local data. If null, DatumManager will discover all users with local data.finalinherited - logLevel → LogLevel
-
The minimum log level for logging output.
finalinherited
-
logSamplers
→ Map<
String, LogSampler> -
Sampling strategies for high-frequency log operations.
finalinherited
- maxChangeCacheSize → int
-
The maximum number of entries to keep in the change cache.
When exceeded, older entries are removed to prevent unbounded memory growth.
finalinherited
-
migrations
→ List<
Migration> -
A list of Migration classes to be run when the schemaVersion is incremented.
finalinherited
-
mockManager
→ DatumManager<
T> -
final
- onMigrationError → MigrationErrorHandler?
-
A callback to handle failures during schema migration.
finalinherited
- performanceLogThreshold → Duration
-
The duration threshold for performance logging.
finalinherited
- progressEventFrequency → int
-
The frequency of progress event emissions during sync operations.
Progress events are emitted every N items processed.
finalinherited
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setterinherited
- remoteEventDebounceTime → Duration
-
The duration to buffer remote changes before processing a batch.
Helps to group rapid-fire updates from a server push into a single operation.
finalinherited
- remoteStreamBatchSize → int
-
The batch size for streaming remote items from adapters.
Smaller batches reduce memory usage but may increase processing overhead.
finalinherited
- remoteSyncBatchSize → int
-
The batch size for processing remote changes during sync operations.
Larger batches reduce memory overhead but may increase latency.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- schemaVersion → int
-
The current version of the data schema for migration purposes.
finalinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited - syncDirectionResolver → SyncDirectionResolver?
-
A callback that allows customizing the sync direction based on pending operations.
finalinherited
- syncExecutionStrategy → DatumSyncExecutionStrategy
-
The execution strategy for processing the sync queue.
finalinherited
- syncRequestStrategy → DatumSyncRequestStrategy
-
The strategy for handling concurrent calls to the
synchronizemethod. Defaults to SequentialRequestStrategy.finalinherited - syncTimeout → Duration
-
The maximum duration for a single sync cycle before it times out.
finalinherited
Methods
-
copyWith<
E extends DatumEntityInterface> ({Duration? autoSyncInterval, bool? autoStartSync, Duration? syncTimeout, DatumConflictResolver< E> ? defaultConflictResolver, UserSwitchStrategy? defaultUserSwitchStrategy, Future<String?> initialUserId()?, bool? enableLogging, SyncDirection? defaultSyncDirection, int? schemaVersion, List<Migration> ? migrations, DatumSyncExecutionStrategy? syncExecutionStrategy, MigrationErrorHandler? onMigrationError, DatumSyncRequestStrategy? syncRequestStrategy, DatumErrorRecoveryStrategy? errorRecoveryStrategy, Duration? remoteEventDebounceTime, Duration? changeCacheDuration, DatumSyncOptions<E> ? defaultSyncOptions, int? maxChangeCacheSize, Duration? changeCacheCleanupInterval, int? remoteSyncBatchSize, int? remoteStreamBatchSize, int? progressEventFrequency, LogLevel? logLevel, bool? enablePerformanceLogging, Duration? performanceLogThreshold, Map<String, LogSampler> ? logSamplers, SyncDirectionResolver? syncDirectionResolver, ColdStartConfig? coldStartConfig, DeleteBehavior? deleteBehavior}) → DatumConfig<E> -
inherited
-
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