Package hudson.lifecycle
Class ExitLifecycle
java.lang.Object
hudson.lifecycle.Lifecycle
hudson.lifecycle.ExitLifecycle
- Direct Known Subclasses:
Lifecycle.PlaceholderLifecycle,SystemdLifecycle
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class ExitLifecycle
extends Lifecycle
Lifecycle that delegates the responsibility to restart Jenkins to an external
watchdog such as SystemD or OpenRC.
Restart by exit with specific code.
- Author:
- Alon Bar-Lev
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.lifecycle.Lifecycle
Lifecycle.PlaceholderLifecycle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonBootFailure(BootFailure problem) Called when Jenkins has failed to boot.voidrestart()If this life cycle supports a restart of Hudson, do so.Methods inherited from class hudson.lifecycle.Lifecycle
canRestart, canRewriteHudsonWar, get, getHudsonWar, onExtendTimeout, onReady, onReload, onStatusUpdate, onStop, rewriteHudsonWar, supportsDynamicLoad, verifyRestartable
-
Constructor Details
-
ExitLifecycle
public ExitLifecycle()
-
-
Method Details
-
restart
public void restart()Description copied from class:LifecycleIf this life cycle supports a restart of Hudson, do so. Otherwise, throwUnsupportedOperationException, which is what the default implementation does.The restart operation may happen synchronously (in which case this method will never return), or asynchronously (in which case this method will successfully return.)
Throw an exception if the operation fails unexpectedly.
-
onBootFailure
Description copied from class:LifecycleCalled when Jenkins has failed to boot.- Overrides:
onBootFailurein classLifecycle- Parameters:
problem- a boot failure (could beJenkinsReloadFailed)
-