BufferedProcessor class
A Processor that buffers up to capacity telemetry items for at most flushDelay before forwarding them onto next.
Telemetry items passed into process will be added to a buffer of size capacity. If the buffer is full, all telemetry items within it are immediately forwarded onto next. Even if the buffer is not full, telemetry items will be forwarded once flushDelay elapses.
- Implemented types
Constructors
- BufferedProcessor({Processor? next, int capacity = 50, Duration flushDelay = const Duration(seconds: 30)})
Properties
- capacity → int
-
The capacity of the buffer which, once filled, will be immediately forwarded to next.
final
- flushDelay → Duration
-
The maximum amount of time telemetry items can sit in the buffer before being forwarded onto next.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- next → Processor?
-
The next processor in the chain, or
null
if there is none.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
flush(
) → Future< void> -
Forwards all items in the buffer onto next before also flushing next.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
process(
{required List< ContextualTelemetryItem> contextualTelemetryItems}) → void -
Add
contextualTelemetryItems
to the buffer, automatically forwarding telemetry if the buffer is full.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited