Class DelegatingCounter

  • All Implemented Interfaces:
    java.io.Serializable, Counter, Metric

    @Internal
    public class DelegatingCounter
    extends java.lang.Object
    implements Metric, Counter, java.io.Serializable
    Implementation of Counter that delegates to the instance for the current context.
    See Also:
    Serialized Form
    • Constructor Detail

      • DelegatingCounter

        public DelegatingCounter​(MetricName name)
      • DelegatingCounter

        public DelegatingCounter​(MetricName name,
                                 boolean processWideContainer)
    • Method Detail

      • inc

        public void inc()
        Increment the counter.
        Specified by:
        inc in interface Counter
      • inc

        public void inc​(long n)
        Increment the counter by the given amount.
        Specified by:
        inc in interface Counter
      • dec

        public void dec()
        Specified by:
        dec in interface Counter
      • dec

        public void dec​(long n)
        Specified by:
        dec in interface Counter