6- Completable Futures
Jul 03, 2026 23:03
· 1:38
· English
· Whisper Turbo
· 2 ஒலிப்பேழைகள்
இந்த பதிவு இன்று காலாவதியாகிறது.
நிலையான சேமிப்புக்காக மேம்படுத்தல் →
காட்டு
0:03
S…
Speaker 1 (6- Completable Futures)
Throughout the rest of this section,
0:05
S…
Speaker 1 (6- Completable Futures)
we're going to talk about a very important type called completable future.
0:08
S…
Speaker 1 (6- Completable Futures)
As you can see this class implements the future interface.
0:12
S…
Speaker 1 (6- Completable Futures)
So every completable future is a future object.
0:15
S…
Speaker 1 (6- Completable Futures)
Now the reason this is called completable future is that with this we can
0:19
S…
Speaker 1 (6- Completable Futures)
explicitly complete a future object.
0:22
S…
Speaker 1 (6- Completable Futures)
This is not something that we can do with the future interface.
0:25
S…
Speaker 1 (6- Completable Futures)
Now, this class also implements another interface called completion stage.
0:29
S…
Speaker 1 (6- Completable Futures)
If you look at the documentation,
0:31
S…
Speaker 1 (6- Completable Futures)
it says that this interface represents a stage of a
0:35
S…
Speaker 1 (6- Completable Futures)
possibly asynchronous operation.
0:37
S…
Speaker 2 (6- Completable Futures)
What does this mean?
0:38
S…
Speaker 2 (6- Completable Futures)
Well,
0:39
S…
Speaker 1 (6- Completable Futures)
in the real world,
0:40
S…
Speaker 1 (6- Completable Futures)
quite often an asynchronous operation involves many steps.
0:43
S…
Speaker 1 (6- Completable Futures)
For example,
0:44
S…
Speaker 1 (6- Completable Futures)
we may call a remote API to get some data.
0:46
S…
Speaker 1 (6- Completable Futures)
That is one step.
0:47
S…
Speaker 1 (6- Completable Futures)
Then perhaps we want to transform that data into a different structure.
0:50
S…
Speaker 1 (6- Completable Futures)
That's another step.
0:52
S…
Speaker 1 (6- Completable Futures)
And finally,
0:53
S…
Speaker 1 (6- Completable Futures)
we want to write that data into a database.
0:54
S…
Speaker 1 (6- Completable Futures)
That's another step.
0:55
S…
Speaker 1 (6- Completable Futures)
This interface represents a step or a stage of an asynchronous operation.
1:00
S…
Speaker 1 (6- Completable Futures)
And it gives us a bunch of methods for combining and composing
1:04
S…
Speaker 1 (6- Completable Futures)
these steps in a declarative way,
1:06
S…
Speaker 1 (6- Completable Futures)
kind of like how we use the streams API to build a complex query in
1:10
S…
Speaker 2 (6- Completable Futures)
a declarative way.
1:11
S…
Speaker 2 (6- Completable Futures)
Earlier,
1:12
S…
Speaker 1 (6- Completable Futures)
we use the map filter and reduce methods to build a complex query.
1:16
S…
Speaker 1 (6- Completable Futures)
Now we can do the same thing with this completion stage interface.
1:20
S…
Speaker 1 (6- Completable Futures)
I'm going to show you how to do that later in this section.
1:22
S…
Speaker 1 (6- Completable Futures)
So over the next few videos,
1:24
S…
Speaker 1 (6- Completable Futures)
we're going to talk about the completable feature class.
1:27
S…
Speaker 1 (6- Completable Futures)
I'm going to show you how to use this class to build complex asynchronous
1:31
S…
Speaker 1 (6- Completable Futures)
operations.
1:32
S…
Speaker 1 (6- Completable Futures)
But first,
1:32
S…
Speaker 1 (6- Completable Futures)
let me show you how to create a completable feature object.
இந்த ஒலிப்பதிவு AI (தானியங்கி பேச்சு அடையாளம்) மூலம் உருவாக்கப்பட்டது. பிழைகள் இருக்கலாம் - முக்கியமான பயன்பாட்டுக்கு மூல ஒலியை சரிபார்க்கவும். AI கொள்கை
சுருக்கம்
இந்த நகலெடுப்புக்கான AI சுருக்கத்தை உருவாக்க சுருக்கம் என்பதை க்ளிக் செய்யவும்.
சுருக்கப்படுகிறது...
இந்த நகலை AI க்குக் கேட்கவும்
இந்த நூலைப் பற்றி ஏதாவது கேட்கவும் - AI தொடர்புடைய பகுதிகளைக் கண்டுபிடித்து பதிலளிக்கும்.