Behaviours: sbroker_meter.
References
See also: sregulator.
Updates a list of regulators with the relative time of either queue.
sregulator_update_meter
can be used as a sbroker_meter
in a sbroker
or
a sregulator
. It will update a list of regulators with the relative time
(in native
time units) of a specified queue at random intervals, ignoring
any regulators that are not alive. Its argument, spec()
, is of the form:
[{Regulator :: sregulator:regulator(), Queue :: ask | ask_r, Config :: #{update => Update :: pos_integer()}}, ...].
Regulator
is a regulator process to update with the approximate relative
time of queue Queue
with updates uniformly distributed from 0.5 * Update
to 1.5 * Update
milliseconds (defaults to 100
). This random interval is
used to prevent synchronisation of update messages and their side effects,
see reference.
spec() = [{Regulator::sregulator:regulator(), Queue::ask | ask_r, Config::#{update => Update::pos_integer()}}, ...]
Generated by EDoc