Class AbstractResourceEnvironment
java.lang.Object
org.palladiosimulator.protocom.framework.java.se.AbstractResourceEnvironment
Assigns strategies for resource demand simulation. Also starts calibration for active resources.
Strategy is chosen by its name.
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String[]
CPU strategies, namesprotected static final Class<?>[]
CPU strategies, corresponding classesprotected static final String[]
HDD strategies, namesprotected static final Class<?>[]
HDD strategies, corresponding classesprotected static final org.apache.log4j.Logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static String
getCalibrationFileName
(IDemandStrategy strategy, DegreeOfAccuracyEnum accuracy, String basePath) Returns the name of the file used to store the calibration table Filename depends on paramters of this classstatic void
performDelay
(double delay) Performs the "delay" resource demand.protected static void
setUpCPU
(String usedStrategy, String calibrationPath, DegreeOfAccuracyEnum accuracy, String processingRate) Starts the CPU calibration.protected static void
setUpHDD
(String usedStrategy, String calibrationPath, DegreeOfAccuracyEnum accuracy, String processingRate) Starts the HDD calibration.
-
Field Details
-
LOGGER
protected static final org.apache.log4j.Logger LOGGER -
CPU_STRATEGIES
CPU strategies, names -
CPU_STRATEGIES_CLASSES
CPU strategies, corresponding classes -
HDD_STRATEGIES
HDD strategies, names -
HDD_STRATEGIES_CLASSES
HDD strategies, corresponding classes
-
-
Constructor Details
-
AbstractResourceEnvironment
public AbstractResourceEnvironment()
-
-
Method Details
-
setUpCPU
protected static void setUpCPU(String usedStrategy, String calibrationPath, DegreeOfAccuracyEnum accuracy, String processingRate) Starts the CPU calibration.- Parameters:
usedStrategy
- name of the used strategycalibrationPath
- path where old calibration runs can be retrieved from and new ones will be storedaccuracy
- accuracy of the calibration: LOW, MEDIUM or HIGHprocessingRate
- processing rate
-
setUpHDD
protected static void setUpHDD(String usedStrategy, String calibrationPath, DegreeOfAccuracyEnum accuracy, String processingRate) Starts the HDD calibration.- Parameters:
usedStrategy
- name of the used strategycalibrationPath
- path where old calibration runs can be retrieved from and new ones will be storedaccuracy
- accuracy of the calibration: LOW, MEDIUM or HIGHprocessingRate
- processing rate
-
getCalibrationFileName
protected static String getCalibrationFileName(IDemandStrategy strategy, DegreeOfAccuracyEnum accuracy, String basePath) Returns the name of the file used to store the calibration table Filename depends on paramters of this class- Returns:
- The calibration table file name
-
performDelay
public static void performDelay(double delay) Performs the "delay" resource demand. TODO: Does not really fit into this class. However, we didn't find a more suiting one.- Parameters:
delay
- delay duration in ms
-