hudson.model.Node.getDynamicLabels()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(124)

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

Node.getDynamicLabels介绍

[英]Return all the labels assigned dynamically to this node. This calls all the LabelFinder implementations with the node converts the results into Labels.
[中]返回动态分配给此节点的所有标签。这将调用所有LabelFinder实现,节点将结果转换为标签。

代码示例

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

  1. /**
  2. * Returns the possibly empty set of labels that are assigned to this node,
  3. * including the automatic {@link #getSelfLabel() self label}, manually
  4. * assigned labels and dynamically assigned labels via the
  5. * {@link LabelFinder} extension point.
  6. *
  7. * This method has a side effect of updating the hudson-wide set of labels
  8. * and should be called after events that will change that - e.g. a agent
  9. * connecting.
  10. */
  11. @Exported
  12. public Set<LabelAtom> getAssignedLabels() {
  13. Set<LabelAtom> r = Label.parse(getLabelString());
  14. r.add(getSelfLabel());
  15. r.addAll(getDynamicLabels());
  16. return Collections.unmodifiableSet(r);
  17. }

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

  1. /**
  2. * Returns the possibly empty set of labels that are assigned to this node,
  3. * including the automatic {@link #getSelfLabel() self label}, manually
  4. * assigned labels and dynamically assigned labels via the
  5. * {@link LabelFinder} extension point.
  6. *
  7. * This method has a side effect of updating the hudson-wide set of labels
  8. * and should be called after events that will change that - e.g. a slave
  9. * connecting.
  10. */
  11. @Exported
  12. public Set<LabelAtom> getAssignedLabels() {
  13. Set<LabelAtom> r = Label.parse(getLabelString());
  14. r.add(getSelfLabel());
  15. r.addAll(getDynamicLabels());
  16. return Collections.unmodifiableSet(r);
  17. }

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

  1. /**
  2. * Returns the possibly empty set of labels that are assigned to this node,
  3. * including the automatic {@link #getSelfLabel() self label}, manually
  4. * assigned labels and dynamically assigned labels via the
  5. * {@link LabelFinder} extension point.
  6. *
  7. * This method has a side effect of updating the hudson-wide set of labels
  8. * and should be called after events that will change that - e.g. a slave
  9. * connecting.
  10. */
  11. @Exported
  12. public Set<LabelAtom> getAssignedLabels() {
  13. Set<LabelAtom> r = Label.parse(getLabelString());
  14. r.add(getSelfLabel());
  15. r.addAll(getDynamicLabels());
  16. return Collections.unmodifiableSet(r);
  17. }

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

  1. /**
  2. * Returns the possibly empty set of labels that are assigned to this node,
  3. * including the automatic {@link #getSelfLabel() self label}, manually
  4. * assigned labels and dynamically assigned labels via the
  5. * {@link LabelFinder} extension point.
  6. *
  7. * This method has a side effect of updating the hudson-wide set of labels
  8. * and should be called after events that will change that - e.g. a agent
  9. * connecting.
  10. */
  11. @Exported
  12. public Set<LabelAtom> getAssignedLabels() {
  13. Set<LabelAtom> r = Label.parse(getLabelString());
  14. r.add(getSelfLabel());
  15. r.addAll(getDynamicLabels());
  16. return Collections.unmodifiableSet(r);
  17. }

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

  1. /**
  2. * Returns the possibly empty set of labels that are assigned to this node,
  3. * including the automatic {@link #getSelfLabel() self label}, manually
  4. * assigned labels and dynamically assigned labels via the
  5. * {@link LabelFinder} extension point.
  6. *
  7. * This method has a side effect of updating the hudson-wide set of labels
  8. * and should be called after events that will change that - e.g. a slave
  9. * connecting.
  10. */
  11. @Exported
  12. public Set<LabelAtom> getAssignedLabels() {
  13. Set<LabelAtom> r = Label.parse(getLabelString());
  14. r.add(getSelfLabel());
  15. r.addAll(getDynamicLabels());
  16. return Collections.unmodifiableSet(r);
  17. }

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

  1. /**
  2. * Returns the possibly empty set of labels that are assigned to this node,
  3. * including the automatic {@link #getSelfLabel() self label}, manually
  4. * assigned labels and dynamically assigned labels via the
  5. * {@link LabelFinder} extension point.
  6. *
  7. * This method has a side effect of updating the hudson-wide set of labels
  8. * and should be called after events that will change that - e.g. a slave
  9. * connecting.
  10. */
  11. @Exported
  12. public Set<LabelAtom> getAssignedLabels() {
  13. Set<LabelAtom> r = Label.parse(getLabelString());
  14. r.add(getSelfLabel());
  15. r.addAll(getDynamicLabels());
  16. return Collections.unmodifiableSet(r);
  17. }

相关文章