本文整理了Java中hudson.remoting.Future
类的一些代码示例,展示了Future
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Future
类的具体详情如下:
包路径:hudson.remoting.Future
类名称:Future
[英]Alias to Future.
This alias is defined so that retro-translation won't affect the publicly committed signature of the API.
[中]未来的别名。
定义此别名是为了使追溯转换不会影响API的公开提交签名。
代码示例来源:origin: jenkinsci/jenkins
try {
future.get();
return future2.get();
} catch (ExecutionException e) {
Throwable cause = e.getCause();
} catch (IOException e) {// BuildException or IOException
try {
future.get(3,TimeUnit.SECONDS);
throw e; // the remote side completed successfully, so the error must be local
} catch (ExecutionException x) {
return future.get();
} catch (ExecutionException e) {
Throwable cause = e.getCause();
代码示例来源:origin: org.eclipse.hudson.main/hudson-remoting
public boolean cancel(boolean mayInterruptIfRunning) {
return core.cancel(mayInterruptIfRunning);
}
代码示例来源:origin: org.eclipse.hudson/hudson-remoting
public boolean isDone() {
return core.isDone();
}
代码示例来源:origin: jenkinsci/maven-plugin
if(!messageReported && !f.isDone()) {
messageReported = true;
listener.getLogger().println(Messages.MavenBuilder_Waiting());
f.get();
} catch (InterruptedException e) {
g.cancel(true);
listener.getLogger().println(Messages.MavenBuilder_Aborted());
return Executor.currentExecutor().abortResult();
代码示例来源:origin: jenkinsci/maven-plugin
while (markCount == start && !f.isDone())
markCountLock.wait(10 * 1000);
f.get();
} catch (ExecutionException e) {
throw new IOException(e);
代码示例来源:origin: org.eclipse.hudson.main/hudson-remoting
public boolean isCancelled() {
return core.isCancelled();
}
代码示例来源:origin: org.jenkins-ci.plugins/ivy
for (Future<?> f : futures) {
try {
if(!f.isDone() && !messageReported) {
messageReported = true;
listener.getLogger().println(Messages.IvyBuilder_Waiting());
f.get();
} catch (InterruptedException e) {
g.cancel(true);
listener.getLogger().println(Messages.IvyBuilder_Aborted());
return Result.ABORTED;
代码示例来源:origin: jenkinsci/remoting
if (img.isDone()) {
try {
return rcl.loadClassFile(name, img.get());
} catch (ExecutionException x) {
代码示例来源:origin: hudson/hudson-2.x
public boolean isCancelled() {
return core.isCancelled();
}
代码示例来源:origin: org.jvnet.hudson.plugins/cvs
private void join(Future<Void> task) throws InterruptedException, IOException {
try {
task.get();
} catch (ExecutionException e) {
throw new IOException2(e);
}
}
代码示例来源:origin: org.hudsonci.plugins/ivy
for (Future<?> f : futures) {
try {
if(!f.isDone() && !messageReported) {
messageReported = true;
listener.getLogger().println(Messages.IvyBuilder_Waiting());
f.get();
} catch (InterruptedException e) {
g.cancel(true);
listener.getLogger().println(Messages.IvyBuilder_Aborted());
return Result.ABORTED;
代码示例来源:origin: jenkinsci/remoting
public boolean isDone() {
return core.isDone();
}
代码示例来源:origin: org.eclipse.hudson/hudson-remoting
public boolean cancel(boolean mayInterruptIfRunning) {
return core.cancel(mayInterruptIfRunning);
}
代码示例来源:origin: jenkinsci/remoting
public boolean isCancelled() {
return core.isCancelled();
}
代码示例来源:origin: org.hudsonci.plugins/cvs
private void join(Future<Void> task) throws InterruptedException, IOException {
try {
task.get();
} catch (ExecutionException e) {
throw new IOException2(e);
}
}
代码示例来源:origin: org.jvnet.hudson.plugins/ivy
for (Future<?> f : futures) {
try {
if(!f.isDone() && !messageReported) {
messageReported = true;
listener.getLogger().println(Messages.IvyBuilder_Waiting());
f.get();
} catch (InterruptedException e) {
g.cancel(true);
listener.getLogger().println(Messages.IvyBuilder_Aborted());
return Result.ABORTED;
代码示例来源:origin: hudson/hudson-2.x
public boolean isDone() {
return core.isDone();
}
代码示例来源:origin: hudson/hudson-2.x
public boolean cancel(boolean mayInterruptIfRunning) {
return core.cancel(mayInterruptIfRunning);
}
代码示例来源:origin: org.eclipse.hudson/hudson-remoting
public boolean isCancelled() {
return core.isCancelled();
}
代码示例来源:origin: jenkinsci/remoting
public X get() throws InterruptedException, ExecutionException {
return adapt(core.get());
}
内容来源于网络,如有侵权,请联系作者删除!