in java/showcase/src/main/java/org/apache/flink/statefun/playground/java/showcase/part5/asyncops/AsyncOpsShowcaseFn.java [82:92]
private CompletableFuture<Integer> getAgeFromRemoteDatabase(String username) {
return CompletableFuture.supplyAsync(
() -> {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
throw new RuntimeException();
}
return 29;
});
}