Java Vervollständigbare Future -Kette 2 Operationen
CompletableFuture<User> getUsersDetail(String userId) {
return CompletableFuture.supplyAsync(() -> {
return UserService.getUserDetails(userId);
});
}
CompletableFuture<Double> getCreditRating(User user) {
return CompletableFuture.supplyAsync(() -> {
return CreditRatingService.getCreditRating(user);
});
}
Distinct Dog