Class AbstractResourceEnvironment
- java.lang.Object
-
- org.palladiosimulator.protocom.framework.java.se.AbstractResourceEnvironment
-
public class AbstractResourceEnvironment extends Object
Assigns strategies for resource demand simulation. Also starts calibration for active resources. Strategy is chosen by its name.
-
-
Field Summary
Fields Modifier and Type Field Description protected static String[]
CPU_STRATEGIES
CPU strategies, namesprotected static Class<?>[]
CPU_STRATEGIES_CLASSES
CPU strategies, corresponding classesprotected static String[]
HDD_STRATEGIES
HDD strategies, namesprotected static Class<?>[]
HDD_STRATEGIES_CLASSES
HDD strategies, corresponding classesprotected static org.apache.log4j.Logger
LOGGER
-
Constructor Summary
Constructors Constructor Description AbstractResourceEnvironment()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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 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 Detail
-
LOGGER
protected static final org.apache.log4j.Logger LOGGER
-
CPU_STRATEGIES
protected static final String[] CPU_STRATEGIES
CPU strategies, names
-
CPU_STRATEGIES_CLASSES
protected static final Class<?>[] CPU_STRATEGIES_CLASSES
CPU strategies, corresponding classes
-
HDD_STRATEGIES
protected static final String[] HDD_STRATEGIES
HDD strategies, names
-
HDD_STRATEGIES_CLASSES
protected static final Class<?>[] HDD_STRATEGIES_CLASSES
HDD strategies, corresponding classes
-
-
Method Detail
-
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
-
-