APIObservableUpDownCounter<T extends num> class
APIObservableUpDownCounter is an asynchronous Instrument which reports values that increase or decrease when the instrument is being observed.
An ObservableUpDownCounter is intended for capturing values that can increase or decrease, such as the current memory usage, active requests, or items in a queue.
Constructors
-
APIObservableUpDownCounter.new(String _name, String? _description, String? _unit, bool _enabled, APIMeter _meter, [ObservableCallback<
T> ? callback]) - Creates a new observable up-down counter instrument
Properties
-
callbacks
→ List<
ObservableCallback< T> > -
Returns the current list of callbacks registered to this instrument.
no setter
- description → String?
-
Returns the description of this observable up-down counter.
no setter
- enabled → bool
-
Returns whether this observable up-down counter is enabled.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- meter → APIMeter
-
Returns the meter that created this observable up-down counter.
no setter
- name → String
-
Returns the name of this observable up-down counter.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- unit → String?
-
Returns the unit of this observable up-down counter.
no setter
Methods
-
addCallback(
ObservableCallback< T> callback) → APICallbackRegistration<T> - Registers a callback function that will be invoked when the instrument is observed.
-
collect(
) → List< Measurement< num> > - Collects measurements from all registered callbacks. This method is typically only called by the SDK during collection.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeCallback(
ObservableCallback< T> callback) → void - Removes a callback from this instrument.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited