Package com.yahoo.container.jdisc.metric
Class ForwardingMetricConsumer
- java.lang.Object
-
- com.yahoo.container.jdisc.metric.ForwardingMetricConsumer
-
- All Implemented Interfaces:
com.yahoo.jdisc.application.MetricConsumer
public final class ForwardingMetricConsumer extends java.lang.Object implements com.yahoo.jdisc.application.MetricConsumer
If more than one
MetricConsumerFactory
is registered in a container, calls toMetric
need to be forwarded to all the underlyingMetricConsumers
. That is the responsibility of this class. Instances of this class is created by theMetricConsumerProvider
in those cases.- Author:
- Simon Thoresen Hult
-
-
Constructor Summary
Constructors Constructor Description ForwardingMetricConsumer(com.yahoo.jdisc.application.MetricConsumer[] consumers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(java.lang.String key, java.lang.Number val, com.yahoo.jdisc.Metric.Context ctx)
com.yahoo.jdisc.Metric.Context
createContext(java.util.Map<java.lang.String,?> properties)
void
set(java.lang.String key, java.lang.Number val, com.yahoo.jdisc.Metric.Context ctx)
-
-
-
Method Detail
-
set
public void set(java.lang.String key, java.lang.Number val, com.yahoo.jdisc.Metric.Context ctx)
- Specified by:
set
in interfacecom.yahoo.jdisc.application.MetricConsumer
-
add
public void add(java.lang.String key, java.lang.Number val, com.yahoo.jdisc.Metric.Context ctx)
- Specified by:
add
in interfacecom.yahoo.jdisc.application.MetricConsumer
-
createContext
public com.yahoo.jdisc.Metric.Context createContext(java.util.Map<java.lang.String,?> properties)
- Specified by:
createContext
in interfacecom.yahoo.jdisc.application.MetricConsumer
-
-