Class 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 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 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ForwardingMetricConsumer

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

      • set

        public void set​(java.lang.String key,
                        java.lang.Number val,
                        com.yahoo.jdisc.Metric.Context ctx)
        Specified by:
        set in interface com.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 interface com.yahoo.jdisc.application.MetricConsumer
      • createContext

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