Package de.uka.ipd.sdq.tcfmoop.config
Class ElapsedTimeConfig
java.lang.Object
de.uka.ipd.sdq.tcfmoop.config.AbstractConfiguration
de.uka.ipd.sdq.tcfmoop.config.ElapsedTimeConfig
- All Implemented Interfaces:
IConfiguration
Configuration class for ElapsedTime termination criterion.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the minimum time in milliseconds that the optimization is allowed to run.Returns the type of the time that is going to be measured.void
setExecutionInterval
(long timeInMilis) Sets the minimum time that the optimization is allowed to run.void
setTimeType
(ElapsedTimeConfig.TimeType timeType) Sets the type of the time that is going to be measured: Pure-CPU time or Clock time.boolean
Checks the configuration object for correctness.Methods inherited from class de.uka.ipd.sdq.tcfmoop.config.AbstractConfiguration
getTerminationCriterionName
-
Constructor Details
-
ElapsedTimeConfig
public ElapsedTimeConfig()
-
-
Method Details
-
validateConfiguration
public boolean validateConfiguration()Checks the configuration object for correctness. Should be called before accessing any of the data of the configuration object- Returns:
- true - The configuration is correct false - The configuration is incomplete or wrong
-
setExecutionInterval
Sets the minimum time that the optimization is allowed to run.- Parameters:
timeInMilis
- The minimum time in milliseconds that the optimization is allowed to run. Should be at least 1.- Throws:
InvalidConfigException
- if the supplied parameter do not conform to the required conditions.
-
getExecutionInterval
public long getExecutionInterval()Returns the minimum time in milliseconds that the optimization is allowed to run.- Returns:
- the minimum time in milliseconds that the optimization is allowed to run.
-
setTimeType
Sets the type of the time that is going to be measured: Pure-CPU time or Clock time. Please note that the measurement of the SPU-Time might not always be possible. If this is the case, then the criterion will automatically switch to Clock time.- Parameters:
timeType
- the type of the time to be measured.- Throws:
InvalidConfigException
- if the supplied parameter do not conform to the required conditions.
-
getTimeType
Returns the type of the time that is going to be measured.- Returns:
- the type of the time that is going to be measured.
-