Class LoggingStatisticCollector

  • All Implemented Interfaces:
    RuntimeStatisticsCollector, org.copperengine.management.StatisticsCollectorMXBean

    public class LoggingStatisticCollector
    extends java.lang.Object
    implements RuntimeStatisticsCollector, org.copperengine.management.StatisticsCollectorMXBean
    Collects runtime statistics and logs average processing times to the logging system in a configurable time interval.
    • Constructor Detail

      • LoggingStatisticCollector

        public LoggingStatisticCollector()
    • Method Detail

      • setLoggingIntervalSec

        public void setLoggingIntervalSec​(int loggingIntervalSec)
      • setResetAfterLogging

        public void setResetAfterLogging​(boolean resetAfterLogging)
        Parameters:
        resetAfterLogging - If set to true, the internal statistics are reseted after a each periodical logging.
      • start

        public void start()
      • shutdown

        public void shutdown()
      • submit

        public void submit​(java.lang.String measurePointId,
                           int elementCount,
                           long elapsedTime,
                           java.util.concurrent.TimeUnit timeUnit)
        Specified by:
        submit in interface RuntimeStatisticsCollector
      • print

        public java.lang.String print()
        Specified by:
        print in interface org.copperengine.management.StatisticsCollectorMXBean
      • print

        public java.lang.String print​(java.lang.String mpId)
        Specified by:
        print in interface org.copperengine.management.StatisticsCollectorMXBean
      • reset

        public void reset()
        Specified by:
        reset in interface org.copperengine.management.StatisticsCollectorMXBean
      • queryAll

        public java.util.List<org.copperengine.management.model.MeasurePointData> queryAll()
        Specified by:
        queryAll in interface org.copperengine.management.StatisticsCollectorMXBean
      • query

        public org.copperengine.management.model.MeasurePointData query​(java.lang.String measurePointId)
        Specified by:
        query in interface org.copperengine.management.StatisticsCollectorMXBean