jenkins.model.Jenkins.setQuietPeriod()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(252)

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

Jenkins.setQuietPeriod介绍

[英]Sets the global quiet period.
[中]设置全局静默期。

代码示例

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

  1. @Override
  2. public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
  3. int i=0;
  4. try {
  5. i = Integer.parseInt(json.getString("quietPeriod"));
  6. } catch (NumberFormatException e) {
  7. // fall through
  8. }
  9. try {
  10. // for compatibility reasons, this value is stored in Jenkins
  11. Jenkins.get().setQuietPeriod(i);
  12. return true;
  13. } catch (IOException e) {
  14. throw new FormException(e,"quietPeriod");
  15. }
  16. }
  17. }

代码示例来源:origin: jenkinsci/jenkinsfile-runner

  1. public void setQuietPeriod(int qp) throws IOException {
  2. jenkins.setQuietPeriod(qp);
  3. }

代码示例来源:origin: io.jenkins.jenkinsfile-runner/setup

  1. public void setQuietPeriod(int qp) throws IOException {
  2. jenkins.setQuietPeriod(qp);
  3. }

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

  1. @Override
  2. public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
  3. int i=0;
  4. try {
  5. i = Integer.parseInt(json.getString("quietPeriod"));
  6. } catch (NumberFormatException e) {
  7. // fall through
  8. }
  9. try {
  10. // for compatibility reasons, this value is stored in Jenkins
  11. Jenkins.getInstance().setQuietPeriod(i);
  12. return true;
  13. } catch (IOException e) {
  14. throw new FormException(e,"quietPeriod");
  15. }
  16. }
  17. }

相关文章

Jenkins类方法