hudson.model.Messages._Node_LabelMissing()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(101)

本文整理了Java中hudson.model.Messages._Node_LabelMissing()方法的一些代码示例,展示了Messages._Node_LabelMissing()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Messages._Node_LabelMissing()方法的具体详情如下:
包路径:hudson.model.Messages
类名称:Messages
方法名:_Node_LabelMissing

Messages._Node_LabelMissing介绍

[英]{0} doesn''t have label {1}
[中]{0}没有标签{1}

代码示例

代码示例来源:origin: jenkinsci/jenkins

Label l = item.getAssignedLabel();
if(l!=null && !l.contains(this))
  return CauseOfBlockage.fromMessage(Messages._Node_LabelMissing(getDisplayName(), l));   // the task needs to be executed on label that this node doesn't have.

代码示例来源:origin: org.eclipse.hudson/hudson-core

public CauseOfBlockage canTake(Queue.BuildableItem item) {
  Label l = item.getAssignedLabel();
  if(l!=null && !l.contains(this))
    return CauseOfBlockage.fromMessage(Messages._Node_LabelMissing(getNodeName(),l));   // the task needs to be executed on label that this node doesn't have.
  if(l==null && getMode()== Mode.EXCLUSIVE)
    return CauseOfBlockage.fromMessage(Messages._Node_BecauseNodeIsReserved(getNodeName()));   // this node is reserved for tasks that are tied to it
  // Check each NodeProperty to see whether they object to this node
  // taking the task
  for (NodeProperty prop: getNodeProperties()) {
    CauseOfBlockage c = prop.canTake(item);
    if (c!=null)    return c;
  }
  // Looks like we can take the task
  return null;
}

代码示例来源:origin: hudson/hudson-2.x

/**
 * Called by the {@link Queue} to determine whether or not this node can
 * take the given task. The default checks include whether or not this node
 * is part of the task's assigned label, whether this node is in
 * {@link Mode#EXCLUSIVE} mode if it is not in the task's assigned label,
 * and whether or not any of this node's {@link NodeProperty}s say that the
 * task cannot be run.
 *
 * @since 1.360
 */
public CauseOfBlockage canTake(Task task) {
  Label l = task.getAssignedLabel();
  if(l!=null && !l.contains(this))
    return CauseOfBlockage.fromMessage(Messages._Node_LabelMissing(getNodeName(),l));   // the task needs to be executed on label that this node doesn't have.
  if(l==null && getMode()== Mode.EXCLUSIVE)
    return CauseOfBlockage.fromMessage(Messages._Node_BecauseNodeIsReserved(getNodeName()));   // this node is reserved for tasks that are tied to it
  // Check each NodeProperty to see whether they object to this node
  // taking the task
  for (NodeProperty prop: getNodeProperties()) {
    CauseOfBlockage c = prop.canTake(task);
    if (c!=null)    return c;
  }
  // Looks like we can take the task
  return null;
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

/**
 * Called by the {@link Queue} to determine whether or not this node can
 * take the given task. The default checks include whether or not this node
 * is part of the task's assigned label, whether this node is in
 * {@link Mode#EXCLUSIVE} mode if it is not in the task's assigned label,
 * and whether or not any of this node's {@link NodeProperty}s say that the
 * task cannot be run.
 *
 * @since 1.360
 */
public CauseOfBlockage canTake(Task task) {
  Label l = task.getAssignedLabel();
  if(l!=null && !l.contains(this))
    return CauseOfBlockage.fromMessage(Messages._Node_LabelMissing(getNodeName(),l));   // the task needs to be executed on label that this node doesn't have.
  if(l==null && getMode()== Mode.EXCLUSIVE)
    return CauseOfBlockage.fromMessage(Messages._Node_BecauseNodeIsReserved(getNodeName()));   // this node is reserved for tasks that are tied to it
  // Check each NodeProperty to see whether they object to this node
  // taking the task
  for (NodeProperty prop: getNodeProperties()) {
    CauseOfBlockage c = prop.canTake(task);
    if (c!=null)    return c;
  }
  // Looks like we can take the task
  return null;
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

/**
 * Called by the {@link Queue} to determine whether or not this node can
 * take the given task. The default checks include whether or not this node
 * is part of the task's assigned label, whether this node is in
 * {@link Mode#EXCLUSIVE} mode if it is not in the task's assigned label,
 * and whether or not any of this node's {@link NodeProperty}s say that the
 * task cannot be run.
 *
 * @since 1.360
 */
public CauseOfBlockage canTake(Task task) {
  Label l = task.getAssignedLabel();
  if(l!=null && !l.contains(this))
    return CauseOfBlockage.fromMessage(Messages._Node_LabelMissing(getNodeName(),l));   // the task needs to be executed on label that this node doesn't have.
  if(l==null && getMode()== Mode.EXCLUSIVE)
    return CauseOfBlockage.fromMessage(Messages._Node_BecauseNodeIsReserved(getNodeName()));   // this node is reserved for tasks that are tied to it
  // Check each NodeProperty to see whether they object to this node
  // taking the task
  for (NodeProperty prop: getNodeProperties()) {
    CauseOfBlockage c = prop.canTake(task);
    if (c!=null)    return c;
  }
  // Looks like we can take the task
  return null;
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

Label l = item.getAssignedLabel();
if(l!=null && !l.contains(this))
  return CauseOfBlockage.fromMessage(Messages._Node_LabelMissing(getDisplayName(), l));   // the task needs to be executed on label that this node doesn't have.

相关文章

Messages类方法