
hudson.model.Node Maven / Gradle / Ivy
package hudson.model;
import hudson.FilePath;
import hudson.Launcher;
import hudson.node_monitors.NodeMonitor;
import hudson.util.ClockDifference;
import hudson.util.EnumConverter;
import org.kohsuke.stapler.Stapler;
import java.io.IOException;
import java.util.Set;
/**
* Commonality between {@link Slave} and master {@link Hudson}.
*
* @author Kohsuke Kawaguchi
* @see NodeMonitor
*/
public interface Node {
/**
* Name of this node.
*
* @return
* "" if this is master
*/
String getNodeName();
/**
* Human-readable description of this node.
*/
String getNodeDescription();
/**
* Returns a {@link Launcher} for executing programs on this node.
*/
Launcher createLauncher(TaskListener listener);
/**
* Returns the number of {@link Executor}s.
*
* This may be different from getExecutors().size()
* because it takes time to adjust the number of executors.
*/
int getNumExecutors();
/**
* Returns {@link Mode#EXCLUSIVE} if this node is only available
* for those jobs that exclusively specifies this node
* as the assigned node.
*/
Mode getMode();
/**
* Gets the corresponding {@link Computer} object.
*
* @return
* never null.
*/
Computer toComputer();
Computer createComputer();
/**
* Returns the possibly empty set of labels that are assigned to this node,
* including the automatic {@link #getSelfLabel() self label}.
*/
Set
© 2015 - 2025 Weber Informatics LLC | Privacy Policy