PrivacyAwareAnalyticsQueue class
Consent-first, schema-redacted, deterministic-sampled persistent FIFO.
Upload ACK is all-or-nothing. Callers must make uploader idempotent by
event QueuedAnalyticsEvent.id: a process crash after remote ACK but before
persisted removal can replay the same event on the next launch.
- Implemented types
Constructors
-
PrivacyAwareAnalyticsQueue({required StorageService storage, required ConsentStateService consent, required SdkEventSchemaRegistry registry, required AnalyticsBatchUploader uploader, int capacity = 1000, int batchSize = 50, double defaultSamplingRate = 1, Map<
String, double> samplingRateOverrides = const {}, RetryPolicy retryPolicy = const RetryPolicy(), RetryExecutor? retryExecutor, String idGenerator()?, int nowMs()?, String sessionSeed()?, String storageKey = StorageKeys.analyticsQueueV1})
Properties
- auditSnapshot → AnalyticsQueueAudit
-
no setter
- batchSize → int
-
final
- capacity → int
-
final
- consent → ConsentStateService
-
final
- defaultSamplingRate → double
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- pendingCount → int
-
no setter
-
pendingEvents
→ List<
QueuedAnalyticsEvent> -
no setter
- registry → SdkEventSchemaRegistry
-
final
- retryPolicy → RetryPolicy
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
samplingRateOverrides
→ Map<
String, double> -
final
- storage → StorageService
-
final
- storageKey → String
-
final
Methods
-
dispose(
) → void -
enqueueDurably(
String name, [Map< String, Object?> ? params]) → Future<bool> -
flush(
) → Future< SdkResult< int> > -
flushPersistence(
) → Future< void> -
logEvent(
String name, [Map< String, Object?> ? params]) → void -
override
-
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