本文整理了Java中hudson.model.Node.isAcceptingTasks()
方法的一些代码示例,展示了Node.isAcceptingTasks()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.isAcceptingTasks()
方法的具体详情如下:
包路径:hudson.model.Node
类名称:Node
方法名:isAcceptingTasks
[英]Returns true if the node is accepting tasks. Needed to allow agents programmatic suspension of task scheduling that does not overlap with being offline. Called by Computer#isAcceptingTasks(). This method is distinct from Computer#isAcceptingTasks() as sometimes the Node concrete class may not have control over the hudson.model.Computer concrete class associated with it.
[中]如果节点正在接受任务,则返回true。需要允许代理程序暂停与脱机不重叠的任务调度。由计算机调用#isAcceptingTasks()。此方法与Computer#isAcceptingTasks()不同,因为有时节点具体类可能无法控制hudson。模型与之相关的计算机具体类。
代码示例来源:origin: jenkinsci/jenkins
/**
* Returns {@code true} if the computer is accepting tasks. Needed to allow agents programmatic suspension of task
* scheduling that does not overlap with being offline.
*
* @return {@code true} if the computer is accepting tasks
* @see hudson.slaves.RetentionStrategy#isAcceptingTasks(Computer)
* @see hudson.model.Node#isAcceptingTasks()
*/
@OverridingMethodsMustInvokeSuper
public boolean isAcceptingTasks() {
final Node node = getNode();
return getRetentionStrategy().isAcceptingTasks(this) && (node == null || node.isAcceptingTasks());
}
代码示例来源:origin: jenkinsci/jenkins
if (!isAcceptingTasks()) {
return new CauseOfBlockage.BecauseNodeIsNotAcceptingTasks(this);
代码示例来源:origin: jenkinsci/amazon-ecs-plugin
private static boolean isNotAcceptingTasks(Node n) {
return n.toComputer().isLaunchSupported() // Launcher hasn't been called yet
|| !n.isAcceptingTasks() // node is not ready yet
;
}
代码示例来源:origin: carlossg/jenkins-kubernetes-plugin
private static boolean isNotAcceptingTasks(Node n) {
return n.toComputer().isLaunchSupported() // Launcher hasn't been called yet
|| !n.isAcceptingTasks() // node is not ready yet
;
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Returns {@code true} if the computer is accepting tasks. Needed to allow agents programmatic suspension of task
* scheduling that does not overlap with being offline.
*
* @return {@code true} if the computer is accepting tasks
* @see hudson.slaves.RetentionStrategy#isAcceptingTasks(Computer)
* @see hudson.model.Node#isAcceptingTasks()
*/
@OverridingMethodsMustInvokeSuper
public boolean isAcceptingTasks() {
final Node node = getNode();
return getRetentionStrategy().isAcceptingTasks(this) && (node == null || node.isAcceptingTasks());
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
if (!isAcceptingTasks()) {
return new CauseOfBlockage.BecauseNodeIsNotAcceptingTasks(this);
内容来源于网络,如有侵权,请联系作者删除!