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

import de.ivu.elect.business.konfiguration.entity.ElectKonfigurationWerte;
import de.ivu.elect.business.konfiguration.entity.KonfigurationLoader;

import javax.ejb.Stateless;
import javax.inject.Inject;
import java.io.Serializable;

@Stateless
public class ElectMemoryGcKonfigurationLoader  implements Serializable {
  private static final long serialVersionUID = 1L;

  @Inject
  private transient KonfigurationLoader konfigurationLoader;

  public long getMaximaleAnzahlEintraege() {
    return konfigurationLoader.resolveLongValue(ElectKonfigurationWerte.MEMORY_GC_ANZAHL_EINTRAEGE);
  }

  public String getCrontab() {
    return konfigurationLoader.resolveStringValue(ElectKonfigurationWerte.MEMORY_GC_CRONTAB);
  }

  public boolean isAusgabenLoggen() {
    return konfigurationLoader.resolveBooleanValue(ElectKonfigurationWerte.MEMORY_GC_LOGGING_ENABLED);
  }
}
