Class SimpleStats

    • Field Detail

      • ZERO_LONG

        public static final LongValue ZERO_LONG
      • ZERO_DOUBLE

        public static final DoubleValue ZERO_DOUBLE
      • m_min

        protected long m_min
      • m_max

        protected long m_max
      • m_sum

        protected long m_sum
      • m_count

        protected long m_count
      • m_dataLock

        protected final Object m_dataLock
      • reportZero

        protected boolean reportZero
        Report zero values during interval if no data is received.
    • Constructor Detail

      • SimpleStats

        public SimpleStats()
      • SimpleStats

        public SimpleStats​(boolean reportZero)
    • Method Detail

      • put

        public void put​(long value)
        Description copied from interface: LongCollector
        Place a long value into the collector to be reported. The actual value reported is determined by the collector implementation that is configured for this source.
        Specified by:
        put in interface LongCollector
        Parameters:
        value - Value to be reported.
      • put

        public void put​(Instant time,
                        long value)
        Description copied from interface: LongCollector
        Place a long value and associated timestamp into the collector to be reported. The actual value and time reported is determined by the collector implementation that is configured for this source.
        Specified by:
        put in interface LongCollector
        Parameters:
        time - Suggested timestamp to use when reporting.
        value - Value to be reported.
      • reset

        public void reset()
      • clone

        public Collector clone()
        Description copied from interface: Collector
        The first instance of a collector is unmarshalled from configuration using hocon, all other instances are cloned from that first one so the clone method should pass along any configuration that was set.
        Specified by:
        clone in interface Collector
        Overrides:
        clone in class Object
        Returns:
        Clone of this collector