
de.mcs.jmeasurement.JMTimerPlugin Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JMeasurement Show documentation
Show all versions of JMeasurement Show documentation
JMeasurement profiling programs in production enviroment
The newest version!
/**
* MCS Media Computer Software
* Copyright 2019 by Wilfried Klaas
* Project: JMeasurement
* File: JMPlugin.java
* EMail: [email protected]
* Created: 06.04.2019 wklaa_000
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see
*/
package de.mcs.jmeasurement;
/**
* @author wklaa_000
* This plugin marker interface is used for plugins using the background timer of the JMeasurement system
*
*/
public interface JMTimerPlugin extends JMPlugin {
default long getPeriod() {
BackgroundProcess annotation = this.getClass().getAnnotation(BackgroundProcess.class);
return annotation != null ? annotation.period() : 60000;
};
default long getDelay() {
BackgroundProcess annotation = this.getClass().getAnnotation(BackgroundProcess.class);
return annotation != null ? annotation.delay() : 10000;
};
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy