Class ElasticTimeOutStrategy
java.lang.Object
hudson.plugins.build_timeout.BuildTimeOutStrategy
hudson.plugins.build_timeout.impl.ElasticTimeOutStrategy
- All Implemented Interfaces:
Describable<BuildTimeOutStrategy>
-
Nested Class Summary
-
Field Summary
Fields inherited from class hudson.plugins.build_timeout.BuildTimeOutStrategy
LOG, MINUTES
-
Constructor Summary
ConstructorDescriptionElasticTimeOutStrategy
(int timeoutPercentage, int timeoutMinutesElasticDefault, int numberOfBuilds) Deprecated.ElasticTimeOutStrategy
(String timeoutPercentage, String timeoutMinutesElasticDefault, String numberOfBuilds) Deprecated.ElasticTimeOutStrategy
(String timeoutPercentage, String timeoutMinutesElasticDefault, String numberOfBuilds, boolean failSafeTimeoutDuration) -
Method Summary
Modifier and TypeMethodDescriptionlong
getTimeOut
(AbstractBuild<?, ?> build, BuildListener listener) Define the delay (in milliseconds) to wait for the build to complete before interrupting.boolean
toString()
Methods inherited from class hudson.plugins.build_timeout.BuildTimeOutStrategy
expandAll, getTimeOut, hasMacros, onWrite, onWrite, wantsCaptureLog
-
Field Details
-
DESCRIPTOR
-
-
Constructor Details
-
ElasticTimeOutStrategy
@Deprecated public ElasticTimeOutStrategy(int timeoutPercentage, int timeoutMinutesElasticDefault, int numberOfBuilds) Deprecated. -
ElasticTimeOutStrategy
@Deprecated public ElasticTimeOutStrategy(String timeoutPercentage, String timeoutMinutesElasticDefault, String numberOfBuilds) Deprecated. -
ElasticTimeOutStrategy
-
-
Method Details
-
getTimeoutPercentage
- Returns:
- how long percentage of the average duration to timeout.
-
getNumberOfBuilds
- Returns:
- the number of last builds to use to calculate average duration.
-
getTimeoutMinutesElasticDefault
- Returns:
- the default minutes to timeout used when failed to calculate average duration
-
isFailSafeTimeoutDuration
public boolean isFailSafeTimeoutDuration()- Returns:
- if fail-safe timeout needs to be used
-
getTimeOut
public long getTimeOut(@NonNull AbstractBuild<?, ?> build, @NonNull BuildListener listener) throws InterruptedException, org.jenkinsci.plugins.tokenmacro.MacroEvaluationException, IOExceptionDescription copied from class:BuildTimeOutStrategy
Define the delay (in milliseconds) to wait for the build to complete before interrupting.- Overrides:
getTimeOut
in classBuildTimeOutStrategy
- Parameters:
build
- the buildlistener
- the build listener- Throws:
InterruptedException
org.jenkinsci.plugins.tokenmacro.MacroEvaluationException
IOException
-
toString
-
getDescriptor
- Specified by:
getDescriptor
in interfaceDescribable<BuildTimeOutStrategy>
- Overrides:
getDescriptor
in classBuildTimeOutStrategy
- Returns:
- See Also:
-