public class GlobalMetricRegistry extends Object
| Constructor and Description |
|---|
GlobalMetricRegistry()
Initializes a new
GlobalMetricRegistry delegating to a new MetricRegistry with default settings. |
GlobalMetricRegistry(com.codahale.metrics.MetricRegistry metricRegistry)
Initializes a
GlobalMetricRegistry delegating to the given metricRegistry. |
| Modifier and Type | Method and Description |
|---|---|
com.codahale.metrics.MetricRegistry |
getRegistry()
Returns the global
MetricRegistry to which components are registered. |
MessageMonitor<? super CommandMessage<?>> |
registerCommandBus(String name)
Registers new metrics to the registry to monitor a
CommandBus. |
MessageMonitor<? extends Message<?>> |
registerComponent(Class<?> componentType,
String componentName)
Registers new metrics to the registry to monitor a component of given
type. |
MessageMonitor<? super EventMessage<?>> |
registerEventBus(String name)
Registers new metrics to the registry to monitor an
EventBus. |
MessageMonitor<? super EventMessage<?>> |
registerEventProcessor(String eventProcessorName)
Registers new metrics to the registry to monitor an
EventProcessor. |
MessageMonitor<? super QueryMessage<?,?>> |
registerQueryBus(String name)
Registers new metrics to the registry to monitor a
CommandBus. |
Configurer |
registerWithConfigurer(Configurer configurer)
Registers the metric registry with the given
configurer via
Configurer.configureMessageMonitor(Function). |
public GlobalMetricRegistry()
GlobalMetricRegistry delegating to a new MetricRegistry with default settings.public GlobalMetricRegistry(com.codahale.metrics.MetricRegistry metricRegistry)
GlobalMetricRegistry delegating to the given metricRegistry.metricRegistry - the metric registry which will record the metricspublic Configurer registerWithConfigurer(Configurer configurer)
configurer via
Configurer.configureMessageMonitor(Function).
Components registered by the configurer will be added by invocation of registerComponent(Class, String).configurer - the application's configurerpublic MessageMonitor<? extends Message<?>> registerComponent(Class<?> componentType, String componentName)
type. The monitor will be
registered with the registry under the given name. The returned MessageMonitor can be installed
on the component to initiate the monitoring.componentType - the type of component to registercomponentName - the name under which the component should be registered to the registryIllegalArgumentException - if the component type is not recognizedpublic MessageMonitor<? super EventMessage<?>> registerEventProcessor(String eventProcessorName)
EventProcessor. The monitor will be registered with
the registry under the given eventProcessorName. The returned MessageMonitor can be installed
on the event processor to initiate the monitoring.eventProcessorName - the name under which the EventProcessor should be registered to the registrypublic MessageMonitor<? super EventMessage<?>> registerEventBus(String name)
EventBus. The monitor will be registered with the
registry under the given name. The returned MessageMonitor can be installed
on the event bus to initiate the monitoring.name - the name under which the eventBus should be registered to the registrypublic MessageMonitor<? super CommandMessage<?>> registerCommandBus(String name)
CommandBus. The monitor will be registered with the
registry under the given name. The returned MessageMonitor can be installed
on the command bus to initiate the monitoring.name - the name under which the commandBus should be registered to the registrypublic MessageMonitor<? super QueryMessage<?,?>> registerQueryBus(String name)
CommandBus. The monitor will be registered with the
registry under the given name. The returned MessageMonitor can be installed
on the command bus to initiate the monitoring.name - the name under which the commandBus should be registered to the registrypublic com.codahale.metrics.MetricRegistry getRegistry()
MetricRegistry to which components are registered.Copyright © 2010–2018. All rights reserved.