仅显示
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(自动语音识别)生成的,可能包含错误——与用于关键用途的原始音频核对。 大赦国际的政策

❤️ 喜欢 STT.ai 吗? 告诉你的朋友!
摘要
点击摘要以生成本记录誊本的 AI 摘要 。
总结中...
询问 AI 有关此分页
询问任何有关这一记录,大赦国际将找到有关章节和答复。