|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.servo.monitor.AbstractContextualMonitor<T,M>
public abstract class AbstractContextualMonitor<T,M extends Monitor<T>>
Base class used to simplify creation of contextual monitors.
| Field Summary | |
|---|---|
protected MonitorConfig |
baseConfig
Base configuration shared across all contexts. |
protected TaggingContext |
context
Context to query when accessing a monitor. |
protected java.util.concurrent.ConcurrentMap<MonitorConfig,M> |
monitors
Thread-safe map keeping track of the distinct monitors that have been created so far. |
protected com.google.common.base.Function<MonitorConfig,M> |
newMonitor
Factory funtion used to create a new instance of a monitor. |
| Constructor Summary | |
|---|---|
protected |
AbstractContextualMonitor(MonitorConfig baseConfig,
TaggingContext context,
com.google.common.base.Function<MonitorConfig,M> newMonitor)
Create a new instance of the monitor. |
| Method Summary | |
|---|---|
MonitorConfig |
getConfig()
Configuration used to identify a monitor and provide metadata used in aggregations. |
protected M |
getMonitorForCurrentContext()
Returns a monitor instance for the current context. |
java.util.List<Monitor<?>> |
getMonitors()
Returns a list of sub-monitors for this composite. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.netflix.servo.monitor.Monitor |
|---|
getValue |
| Field Detail |
|---|
protected final MonitorConfig baseConfig
protected final TaggingContext context
protected final com.google.common.base.Function<MonitorConfig,M extends Monitor<T>> newMonitor
protected final java.util.concurrent.ConcurrentMap<MonitorConfig,M extends Monitor<T>> monitors
| Constructor Detail |
|---|
protected AbstractContextualMonitor(MonitorConfig baseConfig,
TaggingContext context,
com.google.common.base.Function<MonitorConfig,M> newMonitor)
baseConfig - shared configurationcontext - provider for context specific tagsnewMonitor - function to create new monitors| Method Detail |
|---|
protected M getMonitorForCurrentContext()
public MonitorConfig getConfig()
getConfig in interface Monitor<T>public java.util.List<Monitor<?>> getMonitors()
getMonitors in interface CompositeMonitor<T>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||