TelemetryBatch class

Collects events into a batch for efficient bulk sending.

Constructors

TelemetryBatch({int maxSize = 100})

Properties

age Duration
Age of the batch measured from the first event added.
no setter
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Whether the batch contains no events.
no setter
isFull bool
Whether the batch has reached its maximum capacity.
no setter
length int
Number of events currently in the batch.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(TelemetryEvent event) bool
Add an event to the batch. Returns true when the batch is now full.
drain() List<TelemetryEvent>
Drain all events and reset internal state.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited