
package de.ivu.elect.business.system.control;

import javax.ejb.DependsOn;
import javax.ejb.Singleton;
import javax.ejb.Startup;

import de.ivu.elect.business.konfiguration.entity.ElectKonfigurationWerte;
import de.ivu.elect.jee.performance.PerformanceStore;


import static de.ivu.elect.business.konfiguration.entity.ElectKonfigurationWerte.PERFORMANCE_STATISTIKEN_LOG_INTERVALL_CRONTAB;

/**
 *  on 27.01.2017.
 */
@Startup
@Singleton
@DependsOn("StartupSingleton")
public class PerformanceStatistikCronTimer extends AbstractElectCronTimer {


  public PerformanceStatistikCronTimer() {
    super();
  }

  @Override
  protected ElectKonfigurationWerte getElectKonfigurationWerte() {
    return PERFORMANCE_STATISTIKEN_LOG_INTERVALL_CRONTAB;
  }

  @Override
  public String getJobName() {
    return "PerformanceStatistikCronTimer";
  }

  @Override
  protected void timeout() {
    PerformanceStore.logStatistics();
  }
}
