A Guide To CompletableFuture in Java with Examples | Asynchronous Operations in Java | Geekific

preview_player
Показать описание

Java’s Future API was introduced in Java 5, and a Future is used as a reference to the result of an asynchronous computation. We previously explained and gave a lot of examples related to multi-threaded operations in Java, and in this video we further expand on this topic by tackling Completable Futures which were introduced in Java 8 and their main purpose was to handle the limitations of the Future class.

Timestamps:
00:00 Introduction
00:07 What are Completable Futures?
01:00 What are Future Limitations? Why Completable Futures?
02:49 Creating a Completable Future
03:54 Acting on a Completable Future
05:55 Combining Completable Futures
08:11 Exception Handling
09:21 Thanks for Watching!

If you found this video helpful, check other Geekific uploads:

#Geekific #CompletableFuture #Java #Multithreading
Рекомендации по теме
Комментарии
Автор

Simply Great! I don't think you can find a better explanation on CompletableFuture than this.

ibbishariff
Автор

The single most underrated talent in this world rn is to explain things that are hard to understand easy.

alswp
Автор

Great explanation, better than other guides on the internet.

OldBalance
Автор

Hands down the best explanation of completable futures out there. You're a master at explaining difficult concepts

liam
Автор

This explanation is amazing and so clear. Thank you.

mac__
Автор

That was the best explamnation so far! Thank you very much!

caiosaldanha
Автор

Thanks so much for this video it helped alot. This is the best one yet. i tried all the other videos and this one made it clear

Official_Joshua
Автор

Such a wonderful explanation with good examples of each scenario, definitely you get to the point!, you get a new suscriber!

misaelpereira
Автор

This less views is a crime.
This is one shot beginners friendly vid.

ShubhamKumar-bufz
Автор

Wtheck, , thts a lot in just couple of a lot

shrishailmadari
Автор

Thank you!!! Great topic and explanation of it.

svalyavasvalyava
Автор

@geekific dude, your videos are jewels.

ppdmartell
Автор

Do not use blocking operations within CompleteFuture, it will block the platform thread of the ForkJoin Pool which has by default only 1 thread per processor.

zickzack
Автор

Can u make a video on writing test cases for CompletableFutures

KarthickKesavan-si
Автор

Knowledge is really good but the quality is voice is not up to the mark, may be by tool it's manipulated

virendrastock
Автор

I wondered if you might have tackled it elsewhere, but when I attempt to use the .sleep() method, it says that an InterruptedException can be thrown. Now I can handle this by either adding it to the method signature, or use a try-catch block. Now when I use a try-catch block, there is a warning that it is not enough to simply ignore the exception that is thrown, it needs to be re-thrown or interrupted.

I have used something along the lines of:
```
...
try {
TimeUnit.x.sleep(y);
} catch (InterruptedException e) {

}
...
```

Now I have no idea what the reason is behind this, and then when I have tried to throw the InterruptedException, it asks me to surround it in a try catch block inside the catch block.

Not sure if this is thread specific, and if you covered it anywhere else, or able to cover it.

Thanks in advance for any information.

acekokuren