@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @Extension(optional=true) public class SystemdLifecycle extends ExitLifecycle
Lifecycle
that delegates its responsibility to systemd(1)
.ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
SystemdLifecycle() |
Modifier and Type | Method and Description |
---|---|
void |
onExtendTimeout(long timeout,
TimeUnit unit)
Tell the service manager to extend the startup or shutdown timeout.
|
void |
onReady()
Called when Jenkins startup is finished or when Jenkins has finished reloading its
configuration.
|
void |
onReload(String user,
String remoteAddr)
Called when Jenkins is reloading its configuration.
|
void |
onStatusUpdate(String status)
Called when Jenkins service state has changed.
|
void |
onStop(String user,
String remoteAddr)
Called when Jenkins is beginning its shutdown.
|
restart
canRestart, canRewriteHudsonWar, get, getHudsonWar, rewriteHudsonWar, verifyRestartable
public void onReady()
Lifecycle
public void onReload(@NonNull String user, @CheckForNull String remoteAddr)
Lifecycle
Callers must also send an Lifecycle.onReady()
notification when Jenkins has finished
reloading its configuration.
public void onStop(@NonNull String user, @CheckForNull String remoteAddr)
Lifecycle
public void onExtendTimeout(long timeout, @NonNull TimeUnit unit)
Lifecycle
Lifecycle.onExtendTimeout(long, TimeUnit)
must be called again or
startup/shutdown must complete.onExtendTimeout
in class Lifecycle
timeout
- The amount by which to extend the timeout.unit
- The time unit of the timeout argument.public void onStatusUpdate(String status)
Lifecycle
onStatusUpdate
in class Lifecycle
status
- The status string. This is free-form and can be used for various purposes:
general state feedback, completion percentages, human-readable error message, etc.Copyright © 2004–2022. All rights reserved.