Class EstimatedRuntime
- java.lang.Object
-
- com.uc4.api.objects.EstimatedRuntime
-
public class EstimatedRuntime extends java.lang.ObjectEstimated Runtime.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedEstimatedRuntime(com.uc4.util.XMLDocument doc, org.w3c.dom.Element runtime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCurrentERT()Returns the current estimated runtime.intgetFixedValue()Returns the fixed value in seconds.intgetIgnoreDiffMinRuns()Returns the number of past runs, which should be taken into account despite deviations.intgetIgnoreDiffPercent()Returns the number of past runs, which should be taken into account despite deviations.intgetLastRuns()Returns the number of past runs which are taken into account when calculating the ERT.intgetLastRunsPercent()Returns the value in percent for an upward correction or the ERT.voidignoreDifferences(int percent, int minRuns)Possible large deviations to be repressed for the estimated runtime.protected booleanisDirty()booleanisDynamicMethodAdaptive()Returnstrueif the adaptive method is used.booleanisDynamicMethodAverage()Returnstrueif the Average method is used.booleanisDynamicMethodLinear()Returnstrueif the Linear regression method should be used.booleanisDynamicMethodMaxValue()Returnstrueif the Maximum method is used.booleanisIgnoreDifference()Returnstrueif differences should be ignored.booleanisMethodDefault()Returnstrueif "UC_CLIENT_SETTINGS" should be used.booleanisMethodDynamic()Returnstrueif a dynamic method is used to calculate the estimated runtime.booleanisMethodFixedValue()Returnstrueif a fixed value is selected for the estimated runtime.voidsetCurrentERT(int currentERT)Sets the current estimated runtime.voidsetDynamicMethodAdaptive()Selects the adaptive method.voidsetDynamicMethodAverage()Selects the Average method.voidsetDynamicMethodLinear()Selects linear regression method.voidsetDynamicMethodMaxValue()Selects the maximum method.voidsetIgnoreDifference(boolean value)Ifvalueis set totruethe methodignoreDifferencescan be used to ignore differences.voidsetLastRuns(int runs)Sets the number of past runs which are taken into account when calculating the ERT.voidsetLastRunsPercent(int percent)Sets the value in percent for an upward correction or the ERT.voidsetMethodDefault()Selects default (UC_CLIENT_SETTING).voidsetMethodDynamic()Selects dynamic Method: Average, linear regression, maximal value.voidsetMethodFixedValue(int seconds)Sets a fixed value for the estimated runtime.protected voidstore(com.uc4.util.XMLDocument doc, org.w3c.dom.Element runtime)
-
-
-
Method Detail
-
store
protected void store(com.uc4.util.XMLDocument doc, org.w3c.dom.Element runtime)
-
isDynamicMethodLinear
public boolean isDynamicMethodLinear()
Returnstrueif the Linear regression method should be used.With this method, the increase or decrease of runtimes is emphasized. As with the average method, the number of runs and the specification of a correction factor may be specified in percent.
- Returns:
- Boolean which contains true if the linear regression method is selected
-
setDynamicMethodLinear
public void setDynamicMethodLinear()
Selects linear regression method.With this method, the increase or decrease of runtimes is emphasized. As with the average method, the number of runs and the specification of a correction factor may be specified in percent.
-
isDynamicMethodAverage
public boolean isDynamicMethodAverage()
Returnstrueif the Average method is used.The average value from the real runtimes is determined. The number of previous runs may be specified for calculating the average. Furthermore, a correction factor in percent may be set. This will be added to the calculated average value.
- Returns:
- Boolean which contains true if the average method is selected
-
setDynamicMethodAverage
public void setDynamicMethodAverage()
Selects the Average method.The average value from the real runtimes is determined. The number of previous runs may be specified for calculating the average. Furthermore, a correction factor in percent may be set. This will be added to the calculated average value.
-
isDynamicMethodAdaptive
public boolean isDynamicMethodAdaptive()
Returnstrueif the adaptive method is used.- Returns:
- Boolean which contains true if the adaptive method is selected
-
setDynamicMethodAdaptive
public void setDynamicMethodAdaptive()
Selects the adaptive method.
-
isDynamicMethodMaxValue
public boolean isDynamicMethodMaxValue()
Returnstrueif the Maximum method is used.The longest saved value from the list of real runtimes is taken as the estimated runtime.
- Returns:
- Boolean which contains true if the maximum method is selected
-
setDynamicMethodMaxValue
public void setDynamicMethodMaxValue()
Selects the maximum method.The longest saved value from the list of real runtimes is taken as the estimated runtime.
-
isMethodDefault
public boolean isMethodDefault()
Returnstrueif "UC_CLIENT_SETTINGS" should be used.The client's settings in the Variable "UC_CLIENT_SETTINGS" are used for calculating the estimated runtime. If there are no settings, or only invalid ones, the default settings which apply to all clients are used.
- Returns:
- Boolean which contains true if "UC_CLIENT_SETTINGS" is used
-
isMethodFixedValue
public boolean isMethodFixedValue()
Returnstrueif a fixed value is selected for the estimated runtime.- Returns:
- Boolean which contains true if a fixed value is used
-
isMethodDynamic
public boolean isMethodDynamic()
Returnstrueif a dynamic method is used to calculate the estimated runtime.- Returns:
- Boolean which contains true if a dynamic method is used to calculate the estimated runtime
-
setMethodDynamic
public void setMethodDynamic()
Selects dynamic Method: Average, linear regression, maximal value.
-
getCurrentERT
public int getCurrentERT()
Returns the current estimated runtime.- Returns:
- Estimated runtime in seconds
-
setCurrentERT
public void setCurrentERT(int currentERT)
Sets the current estimated runtime.- Parameters:
currentERT- Runtime in seconds
-
setMethodDefault
public void setMethodDefault()
Selects default (UC_CLIENT_SETTING).
-
setMethodFixedValue
public void setMethodFixedValue(int seconds)
Sets a fixed value for the estimated runtime.- Parameters:
seconds- Seconds
-
getFixedValue
public int getFixedValue()
Returns the fixed value in seconds.- Returns:
- Integer containg the fixed value
-
setLastRuns
public void setLastRuns(int runs)
Sets the number of past runs which are taken into account when calculating the ERT. Permitted values: 0 to 25.- Parameters:
runs- Number of runs
-
getLastRuns
public int getLastRuns()
Returns the number of past runs which are taken into account when calculating the ERT.- Returns:
- Number of runs
-
setLastRunsPercent
public void setLastRunsPercent(int percent)
Sets the value in percent for an upward correction or the ERT.- Parameters:
percent- Percent
-
getLastRunsPercent
public int getLastRunsPercent()
Returns the value in percent for an upward correction or the ERT.- Returns:
- Percent
-
ignoreDifferences
public void ignoreDifferences(int percent, int minRuns)Possible large deviations to be repressed for the estimated runtime.- Parameters:
percent- Upper limit in percent, which the real runtime uses to calculate the estimated runtimeminRuns- Number of past runs, which should be taken into account despite deviations. Permitted value: 0 to 25.
-
setIgnoreDifference
public void setIgnoreDifference(boolean value)
Ifvalueis set totruethe methodignoreDifferencescan be used to ignore differences. If set tofalsethe value which are set inignoreDifferencesare ignored.- Parameters:
value- Boolean value indicating if differences should be ignored
-
isIgnoreDifference
public boolean isIgnoreDifference()
Returnstrueif differences should be ignored.- Returns:
- Boolean value indicating if differences should be ignored
-
getIgnoreDiffMinRuns
public int getIgnoreDiffMinRuns()
Returns the number of past runs, which should be taken into account despite deviations.- Returns:
- Number of past runs, which should be taken into account despite deviations
-
getIgnoreDiffPercent
public int getIgnoreDiffPercent()
Returns the number of past runs, which should be taken into account despite deviations.- Returns:
- number of past runs, which should be taken into account despite deviations.
-
isDirty
protected boolean isDirty()
-
-