Package jenkins.model
Class SimpleGlobalBuildDiscarderStrategy
java.lang.Object
jenkins.model.GlobalBuildDiscarderStrategy
jenkins.model.SimpleGlobalBuildDiscarderStrategy
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalBuildDiscarderStrategy>
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class SimpleGlobalBuildDiscarderStrategy
extends GlobalBuildDiscarderStrategy
Apply a user-specified build discarder periodically on all jobs.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Applies this build discarder strategy to the given job, i.e.boolean
isApplicable
(Job<?, ?> job) Returns true if and only if this strategy applies to the given job.Methods inherited from class jenkins.model.GlobalBuildDiscarderStrategy
apply
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface hudson.model.Describable
getDescriptor
-
Constructor Details
-
SimpleGlobalBuildDiscarderStrategy
-
-
Method Details
-
getDiscarder
-
isApplicable
Description copied from class:GlobalBuildDiscarderStrategy
Returns true if and only if this strategy applies to the given job.- Specified by:
isApplicable
in classGlobalBuildDiscarderStrategy
- Returns:
- true if and only if this strategy applies to the given job.
-
apply
Description copied from class:GlobalBuildDiscarderStrategy
Applies this build discarder strategy to the given job, i.e. delete builds based on this strategy's configuration. The default implementation callsGlobalBuildDiscarderStrategy.apply(Run)
on each build.- Overrides:
apply
in classGlobalBuildDiscarderStrategy
- Throws:
IOException
InterruptedException
-