eu.toolchain.async.AsyncFuture.directTransform()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.1k)|赞(0)|评价(0)|浏览(108)

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

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 {

相关文章