本文整理了Java中org.embl.ebi.escience.scufl.Processor.getBackoff()
方法的一些代码示例,展示了Processor.getBackoff()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Processor.getBackoff()
方法的具体详情如下:
包路径:org.embl.ebi.escience.scufl.Processor
类名称:Processor
方法名:getBackoff
暂无
代码示例来源:origin: uk.org.mygrid.taverna/taverna-enactor
double backoff = activeProcessor.getBackoff();
for (int i = 0; i < maxRetries; i++) {
int waitTime = (int) (Math.pow(backoff, i) * baseTimeout);
代码示例来源: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();
}
内容来源于网络,如有侵权,请联系作者删除!