Package jenkins.model

Class 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.
See Also:
  • Constructor Details

    • GlobalBuildDiscarderStrategy

      public GlobalBuildDiscarderStrategy()
  • Method Details

    • 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 calls apply(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