Class MetricsCycleBase

java.lang.Object
java.lang.Thread
de.dlr.proseo.monitor.apimetrics.MetricsCycleBase
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
Metrics10Minutes, MetricsHourly

public abstract class MetricsCycleBase extends Thread
This abstract class contains the base functionality to call the metrics function cyclic.
Author:
Ernst Melchinger
  • Field Details

    • metrics

      protected Metrics metrics
      The Metrics instance used for calculations
    • millisToWait

      protected long millisToWait
      Milliseconds to wait between the calls
  • Constructor Details

    • MetricsCycleBase

      public MetricsCycleBase(MonitorConfiguration config, org.springframework.transaction.PlatformTransactionManager txManager, jakarta.persistence.EntityManager em)
      Constructor of a MetricsCycleBase instance
      Parameters:
      config - The monitor configuration
      txManager - The transaction manager
      em - The JPA entity manager
  • Method Details

    • doCycle

      protected abstract void doCycle()
      To be declared in subclasses
    • run

      public void run()
      Start the metrics thread
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread