Package jenkins.model
Class GlobalBuildDiscarderListener
- All Implemented Interfaces:
ExtensionPoint
@Extension
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class GlobalBuildDiscarderListener
extends RunListener<Run>
Run build discarders on an individual job once a build is finalized
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.model.listeners.RunListener
LISTENERS, targetType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidawait()Waits for all currently scheduled or running discards to complete.voidonFinalized(Run run) Called after a build is moved to theRun.State.COMPLETEDstate.Methods inherited from class hudson.model.listeners.RunListener
all, allowLoad, createLoadAllower, fireCompleted, fireDeleted, fireFinalized, fireInitialize, fireStarted, onCompleted, onDeleted, onInitialize, onStarted, register, setUpEnvironment, unregister
-
Constructor Details
-
GlobalBuildDiscarderListener
public GlobalBuildDiscarderListener()
-
-
Method Details
-
onFinalized
Description copied from class:RunListenerCalled after a build is moved to theRun.State.COMPLETEDstate.At this point, all the records related to a build is written down to the disk. As such,
TaskListeneris no longer available. This happens later thanRunListener.onCompleted(Run, TaskListener).- Overrides:
onFinalizedin classRunListener<Run>
-
await
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public static void await() throws ExceptionWaits for all currently scheduled or running discards to complete.- Throws:
Exception
-