Class MetricReporter
java.lang.Object
org.apache.sling.discovery.impl.support.MetricReporter
- All Implemented Interfaces:
TopologyEventListener
MetricReporter is in charge of listening to TopologyEvents
(by virtue of being a TopologyEventListener) and exposing
metrics (via dropwizard).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
activate()
protected void
void
handleTopologyEvent
(TopologyEvent event) Inform the service about an event in the topology - or in the discovery of the topology.
-
Constructor Details
-
MetricReporter
public MetricReporter()
-
-
Method Details
-
activate
protected void activate() -
deactivate
protected void deactivate() -
handleTopologyEvent
Description copied from interface:TopologyEventListener
Inform the service about an event in the topology - or in the discovery of the topology.Implementors of this method must ensure that this method returns quickly and that no locks are being acquired that could cause deadlocks (ie the framework might call this method holding locks).
The
TopologyEvent
contains details about what changed. The supported event types are:TOPOLOGY_INIT
sent when theTopologyEventListener
was first bound to the discovery service - represents the initial state of the topology at that time.TOPOLOGY_CHANGING
sent when the discovery service discovered a change in the topology and has started to settle the change. This event is sent beforeTOPOLOGY_CHANGED
but is optionalTOPOLOGY_CHANGED
sent when the discovery service discovered a change in the topology and has settled it.PROPERTIES_CHANGED
sent when the one or many properties have changed in an instance in the current topology
- Specified by:
handleTopologyEvent
in interfaceTopologyEventListener
- Parameters:
event
- The topology event
-