本文整理了Java中eu.toolchain.async.AsyncFuture.directTransform()
方法的一些代码示例,展示了AsyncFuture.directTransform()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AsyncFuture.directTransform()
方法的具体详情如下:
包路径:eu.toolchain.async.AsyncFuture
类名称:AsyncFuture
方法名:directTransform
[英]Transforms the value of this future into another type using a transformer function.
Future (this) - *using transformer* -> Future
Use this if the transformation performed does not require any more async operations.
Future first = asyncOperation();};
# use second
}
[中]使用transformer函数将此未来的值转换为另一种类型。
Future (this) - *using transformer* -> Future
如果执行的转换不再需要任何异步操作,请使用此选项。
Future first = asyncOperation();};
# use second
}
代码示例来源:origin: spotify/heroic
});
}, iteratorPolicy)
.directTransform(retryResult -> handleRetryTraceFn.apply(retryResult.getResult(),
queryTracesFromRetries(retryResult.getErrors(), retryResult.getBackoffTimings())));
代码示例来源:origin: eu.toolchain.async/tiny-async-core
return constructor.directTransform(new Transform<T, Void>() {
@Override
public Void transform(T result) throws Exception {
内容来源于网络,如有侵权,请联系作者删除!