Class CounterGroup

    • Constructor Summary

      Constructors 
      Constructor Description
      CounterGroup​(java.lang.String name, Statistics manager)  
      CounterGroup​(java.lang.String name, Statistics manager, boolean fetchParametersFromConfig)
      Create a basic group of counter which may or may not depend on config.
      CounterGroup​(java.lang.String name, Statistics manager, boolean fetchParametersFromConfig, Callback callback, boolean resetCounter)
      Create a group of counters with a callback included.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      void increment​(java.lang.String name)
      Increment named contained counter by 1.
      void increment​(java.lang.String name, long n)
      Increment named contained counter by n.
      void runHandle()
      Dump contained counters to log and reset.
      • Methods inherited from class java.lang.Object

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

      • CounterGroup

        public CounterGroup​(java.lang.String name,
                            Statistics manager)
        Parameters:
        name - The symbolic name of this group of counters.
      • CounterGroup

        public CounterGroup​(java.lang.String name,
                            Statistics manager,
                            boolean fetchParametersFromConfig)
        Create a basic group of counter which may or may not depend on config.
        Parameters:
        name - The symbolic name of this group of counters.
        manager - the statistics manager acquired by injection
        fetchParametersFromConfig - Whether this Group should be configured from config.
      • CounterGroup

        public CounterGroup​(java.lang.String name,
                            Statistics manager,
                            boolean fetchParametersFromConfig,
                            Callback callback,
                            boolean resetCounter)
        Create a group of counters with a callback included.
        Parameters:
        name - The symbolic name of this group of counters.
        manager - the statistics manager acquired by injection
        fetchParametersFromConfig - Whether this Group should be configured from config.
        callback - will be invoked each time data is written to the log
        resetCounter - Control for if this group should be reset between each logging interval.
    • Method Detail

      • increment

        public void increment​(java.lang.String name)
        Increment named contained counter by 1.
      • increment

        public void increment​(java.lang.String name,
                              long n)
        Increment named contained counter by n.
      • runHandle

        public void runHandle()
        Dump contained counters to log and reset.
        Specified by:
        runHandle in class Handle
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in class Handle
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in class Handle