Package jenkins.model
Class GlobalBuildDiscarderStrategy
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<GlobalBuildDiscarderStrategy>
-
- jenkins.model.GlobalBuildDiscarderStrategy
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<GlobalBuildDiscarderStrategy>
- Direct Known Subclasses:
JobGlobalBuildDiscarderStrategy
,SimpleGlobalBuildDiscarderStrategy
public abstract class GlobalBuildDiscarderStrategy extends AbstractDescribableImpl<GlobalBuildDiscarderStrategy> implements ExtensionPoint
Extension point for global background build discarders.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description GlobalBuildDiscarderStrategy()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
apply(Job<? extends Job,? extends Run> job)
Applies this build discarder strategy to the given job, i.e.void
apply(Run<?,?> run)
Applies this build discarder strategy to the given run, i.e.abstract boolean
isApplicable(Job<?,?> job)
Returns true if and only if this strategy applies to the given job.-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Method Detail
-
isApplicable
public abstract boolean isApplicable(Job<?,?> job)
Returns true if and only if this strategy applies to the given job.- Returns:
- true if and only if this strategy applies to the given job.
-
apply
public void apply(Job<? extends Job,? extends Run> job) throws IOException, InterruptedException
Applies this build discarder strategy to the given job, i.e. delete builds based on this strategy's configuration. The default implementation callsapply(Run)
on each build.- Throws:
IOException
InterruptedException
-
apply
public void apply(Run<?,?> run) throws IOException, InterruptedException
Applies this build discarder strategy to the given run, i.e. delete builds based on this strategy's configuration.- Throws:
IOException
InterruptedException
-
-