java completablefuture chain 2 operations

Solutions on MaxInterview for java completablefuture chain 2 operations by the best coders in the world

showing results for - "java completablefuture chain 2 operations"
Mateo
19 Oct 2016
1CompletableFuture<CompletableFuture<Double>> result = getUserDetail(userId)
2.thenApply(user -> getCreditRating(user));
3
Janet
29 Sep 2017
1CompletableFuture<User> getUsersDetail(String userId) {
2	return CompletableFuture.supplyAsync(() -> {
3		return UserService.getUserDetails(userId);
4	});	
5}
6
7CompletableFuture<Double> getCreditRating(User user) {
8	return CompletableFuture.supplyAsync(() -> {
9		return CreditRatingService.getCreditRating(user);
10	});
11}
12
similar questions
queries leading to this page
java completablefuture chain 2 operations