Skip to lesson

Price fetcher with CompletableFuture

A price comparison app asks many shops for a price at once, and the slowest or broken shop must not hold up the answer. CompletableFuture starts every call in parallel, gives each one a time limit and a fallback, and allOf says when all of them are settled.

Sign in to continue this lesson

Create an account to read every lesson, practise with the exercises and keep track of your progress.