hudson.model.Executor.start()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(91)

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

Executor.start介绍

[英]Can't start executor like you normally start a thread.
[中]无法像通常启动线程那样启动executor。

代码示例

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

@Override
protected void set(WorkUnit p) {
  assert this.workUnit == null;
  this.workUnit = p;
  assert executor.isParking();
  executor.start(workUnit);
  // LOGGER.info("Starting "+executor.getName());
}

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

@Override
protected void set(WorkUnit p) {
  assert this.workUnit == null;
  this.workUnit = p;
  assert executor.isParking();
  executor.start(workUnit);
  // LOGGER.info("Starting "+executor.getName());
}

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

private synchronized void setNumExecutors(int n) {
  if(numExecutors==n) return; // no-op
  int diff = n-numExecutors;
  this.numExecutors = n;
  if(diff<0) {
    // send signal to all idle executors to potentially kill them off
    for( Executor e : executors )
      if(e.isIdle())
        e.interrupt();
  } else {
    // if the number is increased, add new ones
    while(executors.size()<numExecutors) {
      Executor e = new Executor(this, executors.size());
      e.start();
      executors.add(e);
    }
  }
}

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

private synchronized void setNumExecutors(int n) {
  if(numExecutors==n) return; // no-op
  int diff = n-numExecutors;
  this.numExecutors = n;
  if(diff<0) {
    // send signal to all idle executors to potentially kill them off
    for( Executor e : executors )
      if(e.isIdle())
        e.interrupt();
  } else {
    // if the number is increased, add new ones
    while(executors.size()<numExecutors) {
      Executor e = new Executor(this, executors.size());
      e.start();
      executors.add(e);
    }
  }
}

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

private synchronized void setNumExecutors(int n) {
  if(numExecutors==n) return; // no-op
  int diff = n-numExecutors;
  this.numExecutors = n;
  if(diff<0) {
    // send signal to all idle executors to potentially kill them off
    for( Executor e : executors )
      if(e.isIdle())
        e.interrupt();
  } else {
    // if the number is increased, add new ones
    while(executors.size()<numExecutors) {
      Executor e = new Executor(this, executors.size());
      e.start();
      executors.add(e);
    }
  }
}

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

private synchronized void setNumExecutors(int n) {
  if (numExecutors == n) {
    return; // no-op
  }
  int diff = n - numExecutors;
  this.numExecutors = n;
  if (diff < 0) {
    // send signal to all idle executors to potentially kill them off
    for (Executor e : executors) {
      if (e.isIdle()) {
        e.interrupt();
      }
    }
  } else {
    // if the number is increased, add new ones
    while (executors.size() < numExecutors) {
      Executor e = new Executor(this, executors.size());
      e.start();
      executors.add(e);
    }
  }
}

相关文章