Class GenerateMetricsTask

  • All Implemented Interfaces:
    java.lang.Runnable

    public class GenerateMetricsTask
    extends java.lang.Object
    implements java.lang.Runnable
    Represents an task which generates metrics of an year.
    Author:
    Christopher Zell
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long INTERVAL
      The interval length in milliseconds.
      static int ITERATION_PER_EXECUTION
      The iteration count which indicates how often the metric generation is repeated per thread execution.
      static long MS_COUNT_PER_YEAR
      The milliseconds per year.
      protected ProcessEngineConfigurationImpl processEngineConfiguration
      The process engine configuration, which is used for the metric reporting.
      static java.lang.ThreadLocal<java.lang.Long> START_TIME
      The start time on which the thread should begin to generate metrics.
      static java.lang.ThreadLocal<java.lang.Integer> THREAD_ID
      The thread id which identifies the current thread.
      static java.util.concurrent.atomic.AtomicInteger THREAD_ID_GENERATOR
      Generator to generate the thread id's.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()  
      • Methods inherited from class java.lang.Object

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

      • ITERATION_PER_EXECUTION

        public static final int ITERATION_PER_EXECUTION
        The iteration count which indicates how often the metric generation is repeated per thread execution.
        See Also:
        Constant Field Values
      • MS_COUNT_PER_YEAR

        public static final long MS_COUNT_PER_YEAR
        The milliseconds per year.
        See Also:
        Constant Field Values
      • THREAD_ID_GENERATOR

        public static final java.util.concurrent.atomic.AtomicInteger THREAD_ID_GENERATOR
        Generator to generate the thread id's.
      • THREAD_ID

        public static final java.lang.ThreadLocal<java.lang.Integer> THREAD_ID
        The thread id which identifies the current thread.
      • START_TIME

        public static final java.lang.ThreadLocal<java.lang.Long> START_TIME
        The start time on which the thread should begin to generate metrics. Each thread has his own start time, which is calculated with his id and the milliseconds per year. That means each thread generated data in a different year.
      • INTERVAL

        public static final long INTERVAL
        The interval length in milliseconds.
        See Also:
        Constant Field Values
      • processEngineConfiguration

        protected ProcessEngineConfigurationImpl processEngineConfiguration
        The process engine configuration, which is used for the metric reporting.
    • Constructor Detail

      • GenerateMetricsTask

        public GenerateMetricsTask​(ProcessEngine processEngine)
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable