Class ForwardingMetricConsumer

  • All Implemented Interfaces:
    com.yahoo.jdisc.application.MetricConsumer

    public final class ForwardingMetricConsumer
    extends Object
    implements com.yahoo.jdisc.application.MetricConsumer
    If more than one MetricConsumerFactory is registered in a container, calls to Metric need to be forwarded to all the underlying MetricConsumers. That is the responsibility of this class. Instances of this class is created by the MetricConsumerProvider in those cases.
    Author:
    Simon Thoresen Hult
    • Constructor Detail

      • ForwardingMetricConsumer

        public ForwardingMetricConsumer​(com.yahoo.jdisc.application.MetricConsumer[] consumers)
    • Method Detail

      • set

        public void set​(String key,
                        Number val,
                        com.yahoo.jdisc.Metric.Context ctx)
        Specified by:
        set in interface com.yahoo.jdisc.application.MetricConsumer
      • add

        public void add​(String key,
                        Number val,
                        com.yahoo.jdisc.Metric.Context ctx)
        Specified by:
        add in interface com.yahoo.jdisc.application.MetricConsumer
      • createContext

        public com.yahoo.jdisc.Metric.Context createContext​(Map<String,​?> properties)
        Specified by:
        createContext in interface com.yahoo.jdisc.application.MetricConsumer