Commit 91d52428 authored by Nils Christian Ehmke's avatar Nils Christian Ehmke

Added JavaDoc

parent f307fa73
package kieker.diagnosis.architecture.monitoring;
/**
* This DTO contains the configuration for the monitoring within the application.
*
* @author Nils Christian Ehmke
*/
public final class MonitoringConfiguration {
private String ivOutputDirectory;
......
......@@ -2,6 +2,12 @@ package kieker.diagnosis.architecture.monitoring;
import kieker.monitoring.core.controller.IMonitoringController;
/**
* This is a holder for the current monitoring configuration and the monitoring controller. This is necessary, as the monitoring probe is not in the CDI context
* and because the monitoring controller can be exchanged during runtime.
*
* @author Nils Christian Ehmke
*/
public final class MonitoringControllerHolder {
private static volatile IMonitoringController cvMonitoringController;
......
package kieker.diagnosis.architecture.monitoring;
/**
* This enum represents the status of the monitoring.
*
* @author Nils Christian Ehmke
*/
public enum Status {
NO_MONITORING, RUNNING, TERMINATED
......
package kieker.diagnosis.architecture.monitoring;
/**
* This enum represents the possible timers for the monitoring configuration.
*
* @author Nils Christian Ehmke
*/
public enum Timer {
MILLIS, NANO
......
package kieker.diagnosis.architecture.monitoring;
/**
* This enum represents the possible writers for the monitoring configuration.
*
* @author Nils Christian Ehmke
*/
public enum Writer {
BINARY_FS, BINARY_NFS
......
......@@ -2,6 +2,11 @@ package kieker.diagnosis.architecture.service.properties;
import com.google.inject.Singleton;
/**
* This system property determines whether the application is executed in development or not.
*
* @author Nils Christian Ehmke
*/
@Singleton
public class DevelopmentModeProperty extends BooleanSystemProperty {
......
......@@ -11,6 +11,11 @@ import kieker.diagnosis.architecture.service.ServiceBase;
import kieker.diagnosis.architecture.service.cache.InvalidateCache;
import kieker.diagnosis.architecture.service.cache.UseCache;
/**
* This service is responsible for loading and saving properties within the application.
*
* @author Nils Christian Ehmke
*/
@Singleton
public class PropertiesService extends ServiceBase {
......@@ -21,6 +26,14 @@ public class PropertiesService extends ServiceBase {
super( false );
}
/**
* Delivers the value of the given application property or its default value, if the property has not been set yet. This method is cached.
*
* @param aPropertyClass
* The property.
*
* @return The value of the given property.
*/
@UseCache ( cacheName = "applicationProperties" )
public <T> T loadApplicationProperty( final Class<? extends ApplicationProperty<T>> aPropertyClass ) {
final ApplicationProperty<T> property = getProperty( aPropertyClass );
......@@ -33,6 +46,14 @@ public class PropertiesService extends ServiceBase {
return property.deserialize( serializedValue );
}
/**
* Saves the given application property.
*
* @param aPropertyClass
* The property.
* @param aValue
* The new value of the property.
*/
@InvalidateCache ( cacheName = "applicationProperties", keyParameter = 0 )
public <T> void saveApplicationProperty( final Class<? extends ApplicationProperty<T>> aPropertyClass, final T aValue ) {
final ApplicationProperty<T> property = getProperty( aPropertyClass );
......@@ -54,6 +75,14 @@ public class PropertiesService extends ServiceBase {
return ivInjector.getInstance( aPropertyClass );
}
/**
* Delivers the value of the given system property. This method is cached.
*
* @param aPropertyClass
* The property.
*
* @return The value of the given property.
*/
@UseCache ( cacheName = "systemProperties" )
public <T> T loadSystemProperty( final Class<? extends SystemProperty<T>> aPropertyClass ) {
final SystemProperty<T> property = getProperty( aPropertyClass );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment