public abstract class SlaveRestarter extends Object implements ExtensionPoint, Serializable
Objects are instantiated on the master, then transfered to a slave via serialization.
ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
SlaveRestarter() |
Modifier and Type | Method and Description |
---|---|
static ExtensionList<SlaveRestarter> |
all() |
abstract boolean |
canWork()
Called on the slave to see if this restarter can work on this slave.
|
abstract void |
restart()
If
canWork() method returns true, this method is called later when
the connection is lost to restart the slave. |
public abstract boolean canWork()
public abstract void restart() throws Exception
canWork()
method returns true, this method is called later when
the connection is lost to restart the slave.
Note that by the time this method is called, classloader is no longer capable of
loading any additional classes. Therefore canWork()
method must have
exercised enough of the actual restart process so that this call can proceed
without trying to load additional classes nor resources.
This method is not expected to return, and the JVM should terminate before this call returns. If the method returns normally, the JNLP slave will move on to the reconnection without restart. If an exception is thrown, it is reported as an error and then the JNLP slave will move on to the reconnection without restart.
Exception
public static ExtensionList<SlaveRestarter> all()
Copyright © 2015. All rights reserved.