本文整理了Java中hudson.model.Hudson.getNodes()
方法的一些代码示例,展示了Hudson.getNodes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hudson.getNodes()
方法的具体详情如下:
包路径:hudson.model.Hudson
类名称:Hudson
方法名:getNodes
[英]Returns all Nodes in the system, excluding Hudson instance itself which represents the master.
[中]返回系统中的所有节点,不包括代表主节点的Hudson实例本身。
代码示例来源:origin: jenkinsci/jenkins
/**
* @deprecated
* Use {@link #getNodes()}. Since 1.252.
*/
@Deprecated
public List<Slave> getSlaves() {
return (List)getNodes();
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* @deprecated
* Use {@link #getNodes()}. Since 1.252.
*/
@Deprecated
public List<Slave> getSlaves() {
return (List)getNodes();
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Gets the slave node of the give name, hooked under this Hudson.
*/
public Node getNode(String name) {
for (Node s : getNodes()) {
if (s.getNodeName().equals(name)) {
return s;
}
}
return null;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Gets the slave node of the give name, hooked under this Hudson.
*/
public Node getNode(String name) {
for (Node s : getNodes()) {
if (s.getNodeName().equals(name)) {
return s;
}
}
return null;
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Gets the slave node of the give name, hooked under this Hudson.
*/
public Node getNode(String name) {
for (Node s : getNodes()) {
if (s.getNodeName().equals(name)) {
return s;
}
}
return null;
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Gets the slave node of the give name, hooked under this Hudson.
*/
public Node getNode(String name) {
for (Node s : getNodes()) {
if (s.getNodeName().equals(name)) {
return s;
}
}
return null;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Gets all the slave names.
*/
public List<String> get_slaveNames() {
return new AbstractList<String>() {
final List<Node> nodes = Hudson.getInstance().getNodes();
public String get(int index) {
return nodes.get(index).getNodeName();
}
public int size() {
return nodes.size();
}
};
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Gets all the slave names.
*/
public List<String> get_slaveNames() {
return new AbstractList<String>() {
final List<Node> nodes = Hudson.getInstance().getNodes();
public String get(int index) {
return nodes.get(index).getNodeName();
}
public int size() {
return nodes.size();
}
};
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-service
public List<Node> getNodes() {
List<Node> nodesToCheck = getHudson().getNodes();
List<Node> nodesToReturn = new ArrayList<Node>(nodesToCheck.size());
for (hudson.model.Node node : nodesToCheck) {
if (this.security.hasPermission(node, Permission.READ)) {
nodesToReturn.add(node);
}
}
return nodesToReturn;
}
代码示例来源:origin: org.eclipse.hudson/hudson-service
public List<Node> getNodes() {
List<Node> nodesToCheck = getHudson().getNodes();
List<Node> nodesToReturn = new ArrayList<Node>(nodesToCheck.size());
for (hudson.model.Node node : nodesToCheck) {
if (this.security.hasPermission(node, Permission.READ)) {
nodesToReturn.add(node);
}
}
return nodesToReturn;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* If there's no distributed build set up, it's pointless to provide this axis.
*/
@Override
public boolean isInstantiable() {
Hudson h = Hudson.getInstance();
return !h.getNodes().isEmpty() || !h.clouds.isEmpty();
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* If there's no distributed build set up, it's pointless to provide
* this axis.
*/
@Override
public boolean isInstantiable() {
Hudson h = Hudson.getInstance();
return !h.getNodes().isEmpty() || !h.clouds.isEmpty();
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* If there's no distributed build set up, it's pointless to provide this axis.
*/
@Override
public boolean isInstantiable() {
Hudson h = Hudson.getInstance();
return !h.getNodes().isEmpty() || !h.clouds.isEmpty();
}
}
代码示例来源:origin: hudson/hudson-2.x
/**
* If there's no distributed build set up, it's pointless to provide this axis.
*/
@Override
public boolean isInstantiable() {
Hudson h = Hudson.getInstance();
return !h.getNodes().isEmpty() || !h.clouds.isEmpty();
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-test-harness
public PretendSlave createPretendSlave(FakeLauncher faker) throws Exception {
synchronized (hudson) {
int sz = hudson.getNodes().size();
PretendSlave slave = new PretendSlave("slave" + sz, createTmpDir().getPath(), "", createComputerLauncher(null), faker);
hudson.addNode(slave);
return slave;
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-test-framework
public PretendSlave createPretendSlave(FakeLauncher faker) throws Exception {
synchronized (hudson) {
int sz = hudson.getNodes().size();
PretendSlave slave = new PretendSlave("slave" + sz, createTmpDir().getPath(), "", createComputerLauncher(null), faker);
hudson.addNode(slave);
return slave;
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-test-framework
public PretendSlave createPretendSlave(FakeLauncher faker) throws Exception {
synchronized (hudson) {
int sz = hudson.getNodes().size();
PretendSlave slave = new PretendSlave("slave" + sz, createTmpDir().getPath(), "", createComputerLauncher(null), faker);
hudson.addNode(slave);
return slave;
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-test-framework
/**
* Creates a slave with certain additional environment variables
*/
public DumbSlave createSlave(String labels, EnvVars env) throws Exception {
synchronized (hudson) {
// this synchronization block is so that we don't end up adding the same slave name more than once.
int sz = hudson.getNodes().size();
DumbSlave slave = new DumbSlave("slave" + sz, "dummy",
createTmpDir().getPath(), "1", Mode.NORMAL, labels == null ? "" : labels, createComputerLauncher(env), RetentionStrategy.NOOP, Collections.EMPTY_LIST);
hudson.addNode(slave);
return slave;
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-test-framework
/**
* Creates a slave with certain additional environment variables
*/
public DumbSlave createSlave(String labels, EnvVars env) throws Exception {
synchronized (hudson) {
// this synchronization block is so that we don't end up adding the same slave name more than once.
int sz = hudson.getNodes().size();
DumbSlave slave = new DumbSlave("slave" + sz, "dummy",
createTmpDir().getPath(), "1", Mode.NORMAL, labels==null?"":labels, createComputerLauncher(env), RetentionStrategy.NOOP, Collections.EMPTY_LIST);
hudson.addNode(slave);
return slave;
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-test-harness
/**
* Creates a slave with certain additional environment variables
*/
public DumbSlave createSlave(String labels, EnvVars env) throws Exception {
synchronized (hudson) {
// this synchronization block is so that we don't end up adding the same slave name more than once.
int sz = hudson.getNodes().size();
DumbSlave slave = new DumbSlave("slave" + sz, "dummy",
createTmpDir().getPath(), "1", Mode.NORMAL, labels==null?"":labels, createComputerLauncher(env), RetentionStrategy.NOOP, Collections.EMPTY_LIST);
hudson.addNode(slave);
return slave;
}
}
内容来源于网络,如有侵权,请联系作者删除!