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
public class ElapsedTimeConfig extends AbstractConfiguration
Configuration class for ElapsedTime termination criterion.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ElapsedTimeConfig.TimeType
-
Constructor Summary
Constructors Constructor Description ElapsedTimeConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getExecutionInterval()
Returns the minimum time in milliseconds that the optimization is allowed to run.ElapsedTimeConfig.TimeType
getTimeType()
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
validateConfiguration()
Checks the configuration object for correctness.-
Methods inherited from class de.uka.ipd.sdq.tcfmoop.config.AbstractConfiguration
getTerminationCriterionName
-
-
-
-
Method Detail
-
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
public void setExecutionInterval(long timeInMilis) throws InvalidConfigException
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
public void setTimeType(ElapsedTimeConfig.TimeType timeType) throws InvalidConfigException
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
public ElapsedTimeConfig.TimeType 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.
-
-