EventAggregator class

Subscribes to an EventBus and keeps a bounded, in-memory history of recent events plus per-type counts — the basis for the events API and dashboards.

Constructors

EventAggregator({int capacity = 1000})
Creates an aggregator retaining up to capacity events.

Properties

capacity int
The maximum number of recent events retained.
final
counts Map<String, int>
A snapshot of all per-type counts.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

attach(EventBus bus) → void
Begins consuming events from bus.
countOf(String type) int
The total number of events seen for type.
detach() Future<void>
Stops consuming events.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recent({int limit = 100}) List<OmnyEvent>
The most recent events, newest first, up to limit.
toString() String
A string representation of this object.
inherited

Operators

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