Package jenkins.model
Class BuildDiscarder
java.lang.Object
jenkins.model.BuildDiscarder
- All Implemented Interfaces:
- ExtensionPoint,- Describable<BuildDiscarder>
- Direct Known Subclasses:
- LogRotator
public abstract class BuildDiscarder
extends Object
implements Describable<BuildDiscarder>, ExtensionPoint
Implementation of "Discard old build records" feature.
 
This extension point allows plugins to implement a different strategy to decide what builds to discard and what builds to keep.
- Since:
- 1.503
- Author:
- Kohsuke Kawaguchi
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classJob.logRotatorused to be typed asLogRotator, so such configuration file ends up trying to unmarshalBuildDiscarderand not its subtype.Nested classes/interfaces inherited from interface hudson.ExtensionPointExtensionPoint.LegacyInstancesAreScopedToHudson
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionGets the descriptor for this instance.abstract voidCalled to perform "garbage collection" on the job to discard old build records.
- 
Constructor Details- 
BuildDiscarderpublic BuildDiscarder()
 
- 
- 
Method Details- 
performCalled to perform "garbage collection" on the job to discard old build records.Normally invoked automatically jobs when new builds occur. The general expectation is that those marked as Run.isKeepLog()will be kept untouched. To delete the build record, callRun.delete().- Throws:
- IOException
- InterruptedException
- See Also:
 
- 
getDescriptorDescription copied from interface:DescribableGets the descriptor for this instance.Descriptoris a singleton for every concreteDescribableimplementation, so ifa.getClass() == b.getClass()then by defaulta.getDescriptor() == b.getDescriptor()as well. (In rare cases a single implementation class may be used for instances with distinct descriptors.)By default looks for a nested class (conventionally named DescriptorImpl) implementingDescriptorand marked withExtension.- Specified by:
- getDescriptorin interface- Describable<BuildDiscarder>
 
 
-