本文整理了Java中io.trane.future.Future.voided()
方法的一些代码示例,展示了Future.voided()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Future.voided()
方法的具体详情如下:
包路径:io.trane.future.Future
类名称:Future
方法名:voided
[英]Creates a future that is satisfied with void when this future completes.
[中]当未来完成时,创建一个满足于void的未来。
代码示例来源:origin: traneio/future
@Override
final Future<Void> apply(final Future<T> result) {
return result.voided();
}
}
代码示例来源:origin: traneio/ndbc
@Override
public Future<Void> rollback() {
return execute("ROLLBACK").voided();
}
}
代码示例来源:origin: traneio/ndbc
@Override
public Future<Void> beginTransaction() {
return execute("BEGIN").voided();
}
代码示例来源:origin: traneio/ndbc
@Override
public Future<Void> rollback() {
return execute("ROLLBACK").voided();
}
}
代码示例来源:origin: traneio/ndbc
@Override
public Future<Void> commit() {
return execute("COMMIT").voided();
}
代码示例来源:origin: traneio/ndbc
@Override
public Future<Void> beginTransaction() {
return execute("BEGIN").voided();
}
代码示例来源:origin: traneio/ndbc
@Override
public Future<Void> commit() {
return execute("COMMIT").voided();
}
代码示例来源:origin: traneio/future
/**
* This method is similar to collect, but it discards the result of the
* futures. It's useful to wait for a list of pending future side effects.
*
* @param list the futures to wait for
* @return a void future that indicates that all futures are satisfied.
*/
public static <T> Future<Void> join(final List<? extends Future<T>> list) {
switch (list.size()) {
case 0:
return VOID;
case 1:
return list.get(0).voided();
default:
final JoinPromise<T> p = new JoinPromise<>(list);
for (final Future<T> f : list) {
if (f instanceof ExceptionFuture)
return f.voided();
f.respond(p);
}
return p;
}
}
代码示例来源:origin: traneio/ndbc
}).voided();
}).orElse(Future.VOID);
内容来源于网络,如有侵权,请联系作者删除!