|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.AbstractModelObject
hudson.model.Node
hudson.model.Slave
public abstract class Slave
Information about a Hudson slave node.
Ideally this would have been in the hudson.slaves package, but for compatibility reasons, it can't.
TODO: move out more stuff to DumbSlave
.
Nested Class Summary | |
---|---|
static class |
Slave.JnlpJar
Web-bound object used to serve jar files for JNLP. |
static class |
Slave.SlaveDescriptor
|
Nested classes/interfaces inherited from class hudson.model.Node |
---|
Node.InternalComputerListener, Node.Mode |
Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
Field Summary | |
---|---|
protected String |
name
Name of this slave node. |
protected String |
remoteFS
Path to the root of the workspace from the view point of this node, such as "/hudson" |
Fields inherited from class hudson.model.Node |
---|
holdOffLaunchUntilSave |
Constructor Summary | |
---|---|
Slave(String name,
String nodeDescription,
String remoteFS,
int numExecutors,
Node.Mode mode,
String labelString,
ComputerLauncher launcher,
RetentionStrategy retentionStrategy)
Deprecated. since 2009-02-20. |
|
Slave(String name,
String nodeDescription,
String remoteFS,
int numExecutors,
Node.Mode mode,
String labelString,
ComputerLauncher launcher,
RetentionStrategy retentionStrategy,
List<? extends NodeProperty<?>> nodeProperties)
|
|
Slave(String name,
String nodeDescription,
String remoteFS,
String numExecutors,
Node.Mode mode,
String labelString,
ComputerLauncher launcher,
RetentionStrategy retentionStrategy,
List<? extends NodeProperty<?>> nodeProperties)
|
Method Summary | |
---|---|
Computer |
createComputer()
Creates a new Computer object that acts as the UI peer of this Node . |
Launcher |
createLauncher(TaskListener listener)
Returns a Launcher for executing programs on this node. |
boolean |
equals(Object o)
|
ClockDifference |
getClockDifference()
Estimates the clock difference with this slave. |
SlaveComputer |
getComputer()
Gets the corresponding computer object. |
Slave.SlaveDescriptor |
getDescriptor()
Gets the descriptor for this instance. |
String |
getLabelString()
Returns the manually configured label for a node. |
ComputerLauncher |
getLauncher()
|
Node.Mode |
getMode()
Returns Node.Mode.EXCLUSIVE if this node is only available
for those jobs that exclusively specifies this node
as the assigned node. |
String |
getNodeDescription()
Human-readable description of this node. |
String |
getNodeName()
Name of this node. |
DescribableList<NodeProperty<?>,NodePropertyDescriptor> |
getNodeProperties()
Gets the NodeProperty instances configured for this Node . |
int |
getNumExecutors()
Returns the number of Executor s. |
String |
getRemoteFS()
|
RetentionStrategy |
getRetentionStrategy()
|
FilePath |
getRootPath()
Gets the root directory of this node. |
String |
getUserId()
Return id of user which created this slave |
FilePath |
getWorkspaceFor(TopLevelItem item)
Returns a "workspace" directory for the given TopLevelItem . |
FilePath |
getWorkspaceRoot()
Root directory on this slave where all the job workspaces are laid out. |
int |
hashCode()
|
protected Object |
readResolve()
Invoked by XStream when this object is read into memory. |
void |
setLabelString(String labelString)
Sets the label string for a node. |
void |
setLauncher(ComputerLauncher launcher)
|
void |
setMode(Node.Mode mode)
|
void |
setNodeName(String name)
When the user clones a Node , Hudson uses this method to change the node name right after
the cloned Node object is instantiated. |
void |
setRetentionStrategy(RetentionStrategy availabilityStrategy)
|
void |
setUserId(String userId)
|
Methods inherited from class hudson.model.Node |
---|
canTake, canTake, checkPermission, createPath, getACL, getAssignedLabels, getChannel, getDisplayName, getFileSystemProvisioner, getLabelCloud, getNodePropertyDescriptors, getSearchUrl, getSelfLabel, hasPermission, isHoldOffLaunchUntilSave, reconfigure, toComputer |
Methods inherited from class hudson.model.AbstractModelObject |
---|
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String name
protected final String remoteFS
Constructor Detail |
---|
@DataBoundConstructor public Slave(String name, String nodeDescription, String remoteFS, String numExecutors, Node.Mode mode, String labelString, ComputerLauncher launcher, RetentionStrategy retentionStrategy, List<? extends NodeProperty<?>> nodeProperties) throws Descriptor.FormException, IOException
Descriptor.FormException
IOException
@Deprecated public Slave(String name, String nodeDescription, String remoteFS, int numExecutors, Node.Mode mode, String labelString, ComputerLauncher launcher, RetentionStrategy retentionStrategy) throws Descriptor.FormException, IOException
Descriptor.FormException
IOException
public Slave(String name, String nodeDescription, String remoteFS, int numExecutors, Node.Mode mode, String labelString, ComputerLauncher launcher, RetentionStrategy retentionStrategy, List<? extends NodeProperty<?>> nodeProperties) throws Descriptor.FormException, IOException
Descriptor.FormException
IOException
Method Detail |
---|
public String getUserId()
public void setUserId(String userId)
public ComputerLauncher getLauncher()
public void setLauncher(ComputerLauncher launcher)
public String getRemoteFS()
public String getNodeName()
Node
getNodeName
in class Node
public void setNodeName(String name)
Node
Node
, Hudson uses this method to change the node name right after
the cloned Node
object is instantiated.
This method is never used for any other purpose, and as such for all practical intents and purposes, the node name should be treated like immutable.
setNodeName
in class Node
public String getNodeDescription()
Node
getNodeDescription
in class Node
public int getNumExecutors()
Node
Executor
s.
This may be different from getExecutors().size()
because it takes time to adjust the number of executors.
getNumExecutors
in class Node
public Node.Mode getMode()
Node
Node.Mode.EXCLUSIVE
if this node is only available
for those jobs that exclusively specifies this node
as the assigned node.
getMode
in class Node
public void setMode(Node.Mode mode)
public DescribableList<NodeProperty<?>,NodePropertyDescriptor> getNodeProperties()
Node
NodeProperty
instances configured for this Node
.
getNodeProperties
in class Node
public RetentionStrategy getRetentionStrategy()
public void setRetentionStrategy(RetentionStrategy availabilityStrategy)
public String getLabelString()
Node
Node.getAssignedLabels()
and includes all labels that have been
manually configured.
Mainly for form binding.
getLabelString
in class Node
public void setLabelString(String labelString) throws IOException
Node
Node.getLabelString()
.
setLabelString
in class Node
labelString
- The new label string to use.
IOException
public ClockDifference getClockDifference() throws IOException, InterruptedException
Node
getClockDifference
in class Node
InterruptedException
- if the operation is aborted.
IOException
public Computer createComputer()
Node
Computer
object that acts as the UI peer of this Node
.
Nobody but Jenkins.updateComputerList()
should call this method.
createComputer
in class Node
public FilePath getWorkspaceFor(TopLevelItem item)
Node
TopLevelItem
.
Workspace directory is usually used for keeping out the checked out source code, but it can be used for anything.
getWorkspaceFor
in class Node
public FilePath getRootPath()
Node
Hudson always owns a directory on every node. This method returns that.
getRootPath
in class Node
FilePath
object is not available.public FilePath getWorkspaceRoot()
public Launcher createLauncher(TaskListener listener)
Node
Launcher
for executing programs on this node.
The callee must call Launcher.decorateFor(Node)
before returning to complete the decoration.
createLauncher
in class Node
public SlaveComputer getComputer()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
protected Object readResolve()
public Slave.SlaveDescriptor getDescriptor()
Describable
Descriptor
is a singleton for every concrete Describable
implementation, so if a.getClass()==b.getClass() then
a.getDescriptor()==b.getDescriptor() must hold.
getDescriptor
in interface Describable<Node>
getDescriptor
in class Node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |