org.embl.ebi.escience.scufl.Processor.getWorkers()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(133)

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

Processor.getWorkers介绍

暂无

代码示例

代码示例来源:origin: uk.org.mygrid.taverna/taverna-enactor

} else {
  int workers = activeProcessor.getWorkers();
  if (workers > rootNode.size()) {
    workers = rootNode.size();

代码示例来源:origin: net.sf.taverna.t2/cyclone-impl

private void addDispatchLayers(
    org.embl.ebi.escience.scufl.Processor t1Processor,
    DispatchStack dispatchStack) throws EditException {
  int maxJobs = t1Processor.getWorkers();
  int maxRetries = t1Processor.getRetries();
  float backoffFactor = (float) t1Processor.getBackoff();
  int initialDelay = t1Processor.getRetryDelay();
  int maxDelay = (int) (initialDelay * (Math.pow(backoffFactor,
      maxRetries)));
  DispatchLayer<?> parallelize = new Parallelize(maxJobs);
  DispatchLayer<?> errorBounce = new ErrorBounce();
  DispatchLayer<?> failover = new Failover();
  DispatchLayer<?> retry = new Retry(maxRetries, initialDelay, maxDelay,
      backoffFactor);
  DispatchLayer<?> invoke = new Invoke();
  int layer = 0;
  edits.getAddDispatchLayerEdit(dispatchStack, parallelize, layer++).doEdit();
  edits.getAddDispatchLayerEdit(dispatchStack, errorBounce, layer++).doEdit();
  edits.getAddDispatchLayerEdit(dispatchStack, failover, layer++).doEdit();
  edits.getAddDispatchLayerEdit(dispatchStack, retry, layer++).doEdit();
  edits.getAddDispatchLayerEdit(dispatchStack, invoke, layer++).doEdit();
}

代码示例来源:origin: net.sf.taverna.t2/compatibility-impl

private void addDispatchLayers(
    org.embl.ebi.escience.scufl.Processor t1Processor,
    DispatchStack dispatchStack) throws EditException {
  int maxJobs = t1Processor.getWorkers();
  int maxRetries = t1Processor.getRetries();
  float backoffFactor = (float) t1Processor.getBackoff();
  int initialDelay = t1Processor.getRetryDelay();
  int maxDelay = (int) (initialDelay * (Math.pow(backoffFactor,
      maxRetries)));
  DispatchLayer<?> parallelize = new Parallelize(maxJobs);
  DispatchLayer<?> errorBounce = new ErrorBounce();
  DispatchLayer<?> failover = new Failover();
  DispatchLayer<?> retry = new Retry(maxRetries, initialDelay, maxDelay,
      backoffFactor);
  DispatchLayer<?> invoke = new Invoke();
  int layer = 0;
  edits.getAddDispatchLayerEdit(dispatchStack, parallelize, layer++)
      .doEdit();
  edits.getAddDispatchLayerEdit(dispatchStack, errorBounce, layer++)
      .doEdit();
  edits.getAddDispatchLayerEdit(dispatchStack, failover, layer++)
      .doEdit();
  edits.getAddDispatchLayerEdit(dispatchStack, retry, layer++).doEdit();
  edits.getAddDispatchLayerEdit(dispatchStack, invoke, layer++).doEdit();
}

相关文章