Package hudson.lifecycle
Class UnixLifecycle
- java.lang.Object
-
- hudson.lifecycle.Lifecycle
-
- hudson.lifecycle.UnixLifecycle
-
- All Implemented Interfaces:
ExtensionPoint
public class UnixLifecycle extends Lifecycle
Lifecycle
implementation when Hudson runs on the embedded servlet container on Unix.Restart by exec to self.
- Since:
- 1.304
- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description UnixLifecycle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
restart()
If this life cycle supports a restart of Hudson, do so.void
verifyRestartable()
Can theLifecycle.restart()
method restart Hudson?-
Methods inherited from class hudson.lifecycle.Lifecycle
canRestart, canRewriteHudsonWar, get, getHudsonWar, onExtendTimeout, onReady, onReload, onStatusUpdate, onStop, rewriteHudsonWar
-
-
-
-
Constructor Detail
-
UnixLifecycle
public UnixLifecycle() throws IOException
- Throws:
IOException
-
-
Method Detail
-
restart
public void restart() throws IOException, InterruptedException
Description copied from class:Lifecycle
If 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.
- Overrides:
restart
in classLifecycle
- Throws:
IOException
InterruptedException
-
verifyRestartable
public void verifyRestartable() throws RestartNotSupportedException
Description copied from class:Lifecycle
Can theLifecycle.restart()
method restart Hudson?- Overrides:
verifyRestartable
in classLifecycle
- Throws:
RestartNotSupportedException
- If the restart is not supported, throw this exception and explain the cause.
-
-