本文整理了Java中hudson.model.Node.createComputer()
方法的一些代码示例,展示了Node.createComputer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.createComputer()
方法的具体详情如下:
包路径:hudson.model.Node
类名称:Node
方法名:createComputer
[英]Creates a new Computer object that acts as the UI peer of this Node. Nobody but Hudson#updateComputerList() should call this method.
[中]创建一个新的计算机对象,作为此节点的UI对等对象。除了Hudson#updateComputerList()之外,没有人应该调用此方法。
代码示例来源:origin: jenkinsci/jenkins
c = n.createComputer();
} catch(RuntimeException ex) { // Just in case there is a bogus extension
LOGGER.log(Level.WARNING, "Error retrieving computer for node " + n.getNodeName() + ", continuing", ex);
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
private void updateComputer(Node n, Map<String, Computer> byNameMap, Set<Computer> used) {
Computer c;
c = byNameMap.get(n.getNodeName());
if (c != null) {
c.setNode(n); // reuse
} else {
if (n.getNumExecutors() > 0) {
computers.put(n, c = n.createComputer());
if (!n.holdOffLaunchUntilSave && AUTOMATIC_SLAVE_LAUNCH) {
RetentionStrategy retentionStrategy = c.getRetentionStrategy();
if (retentionStrategy != null) {
// if there is a retention strategy, it is responsible for deciding to start the computer
retentionStrategy.start(c);
} else {
// we should never get here, but just in case, we'll fall back to the legacy behaviour
c.connect(true);
}
}
}
}
used.add(c);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
private void updateComputer(Node n, Map<String, Computer> byNameMap, Set<Computer> used) {
Computer c;
c = byNameMap.get(n.getNodeName());
if (c != null) {
c.setNode(n); // reuse
} else {
if (n.getNumExecutors() > 0) {
computers.put(n, c = n.createComputer());
if (!n.holdOffLaunchUntilSave && AUTOMATIC_SLAVE_LAUNCH) {
RetentionStrategy retentionStrategy = c.getRetentionStrategy();
if (retentionStrategy != null) {
// if there is a retention strategy, it is responsible for deciding to start the computer
retentionStrategy.start(c);
} else {
// we should never get here, but just in case, we'll fall back to the legacy behaviour
c.connect(true);
}
}
}
}
used.add(c);
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
private void updateComputer(Node n, Map<String, Computer> byNameMap, Set<Computer> used) {
Computer c;
c = byNameMap.get(n.getNodeName());
if (c != null) {
c.setNode(n); // reuse
} else {
if (n.getNumExecutors() > 0) {
computers.put(n, c = n.createComputer());
if (!n.holdOffLaunchUntilSave && AUTOMATIC_SLAVE_LAUNCH) {
RetentionStrategy retentionStrategy = c.getRetentionStrategy();
if (retentionStrategy != null) {
// if there is a retention strategy, it is responsible for deciding to start the computer
retentionStrategy.start(c);
} else {
// we should never get here, but just in case, we'll fall back to the legacy behaviour
c.connect(true);
}
}
}
}
used.add(c);
}
代码示例来源:origin: hudson/hudson-2.x
private void updateComputer(Node n, Map<String, Computer> byNameMap, Set<Computer> used) {
Computer c;
c = byNameMap.get(n.getNodeName());
if (c != null) {
c.setNode(n); // reuse
} else {
if (n.getNumExecutors() > 0) {
computers.put(n, c = n.createComputer());
if (!n.holdOffLaunchUntilSave && AUTOMATIC_SLAVE_LAUNCH) {
RetentionStrategy retentionStrategy = c.getRetentionStrategy();
if (retentionStrategy != null) {
// if there is a retention strategy, it is responsible for deciding to start the computer
retentionStrategy.start(c);
} else {
// we should never get here, but just in case, we'll fall back to the legacy behaviour
c.connect(true);
}
}
}
}
used.add(c);
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
c = n.createComputer();
} catch(RuntimeException ex) { // Just in case there is a bogus extension
LOGGER.log(Level.WARNING, "Error retrieving computer for node " + n.getNodeName() + ", continuing", ex);
内容来源于网络,如有侵权,请联系作者删除!