View Source ZenMonitor.Local.Tables (ZenMonitor v2.0.1)
ZenMonitor.Local.Tables
owns tables that are shared between multiple ZenMonitor.Local
components.
See nodes/0
and references/0
for more information.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Callback implementation for GenServer.init/1
.
Nodes holds cached information about remote node compatibility
References holds the set of authoritative monitor references
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Callback implementation for GenServer.init/1
.
Specs
nodes() :: :ets.tab()
Nodes holds cached information about remote node compatibility
This information is stored in one of the following structures:
For compatible nodes { remote_node, :compatible } ^---key---^ ^--value--^
For incompatible nodes { remote_node, {:incompatible, enforce_until, attempts} } ^---key---^ ^---------------value-----------------^
enforce_until
is the time (as reported by System.monotonic_time(:milliseconds)) after which
this cache entry should no longer be enforced.
attempts
is the number of consecutive connect attempts that have failed, this value is useful
for calculating geometric backoff values
Specs
references() :: :ets.tab()
References holds the set of authoritative monitor references
These references are stored in this structure:
{ {subscriber_pid, monitor_reference}, {remote_node, remote_pid} } ^-------------key-----------------^ ^----------value--------^
There is a compound key of {subscriber_pid, monitor_reference} this allows for lookup of a given reference (if the subscriber is known, by convention it will be the calling process, self()) or the retrieval of all active monitors for a subscriber.