Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Future in WebApp (Java)
Search
Kengo TODA
July 17, 2016
Technology
210
0
Share
Future in WebApp (Java)
Short description about Future and CompletableFuture
Kengo TODA
July 17, 2016
More Decks by Kengo TODA
See All by Kengo TODA
生成AI 業務応用向けガイドライン 斜め読み / Overview of Generative AI Business Application Guidelines
eller86
0
170
KotlinユーザのためのJSpecify入門 / JSpecify 101 for Kotlin Devs
eller86
0
2k
JavaとGroovyで書かれたGradleプラグインをKotlinで書き直した話 / Converted a Gradle plugin from Groovy&Java to Kotlin
eller86
0
1.8k
ヒューマンスキル / The Humanskills
eller86
0
750
医療機関向けシステムの信頼性 / Reliability of systems for medical institutions
eller86
0
520
Server-side Kotlinを使うスタートアップでどんなDetektルールが育ったか / Detekt rules made in start-up working with Server-side Kotlin
eller86
0
1.6k
Java開発者向けのKotlin Gradleビルドスクリプト入門 / Gradle Build Script in Kotlin 101
eller86
1
2.1k
Goodbye JSR305, Hello JSpecify!
eller86
2
5.5k
Java8〜16におけるバイトコード生成の変化 / Changes of Bytecode Generation from Java 8 to 16
eller86
4
4.7k
Other Decks in Technology
See All in Technology
【技術書典20】OpenFOAM(自宅で深める流体解析)流れと熱移動(2)
kamakiri1225
0
370
知ってた?JavaScriptの"正しさ"を検証するテストが5万以上もあること(Test262)
riyaamemiya
1
140
MySQL 9.7がやってきた ~これまでのあらすじと基本情報~ @ 日本MySQLユーザ会会2026年04月 / mysql97-yattekita
sakaik
0
170
Fabric MCPの紹介と使い分け
ryomaru0825
1
110
新卒エンジニア研修、ハンズオンの設計における課題と実践知/ #tachikawaany
nishiuma
2
100
バイブコーディングで3倍早く⚪⚪を作ってみた
samakada
0
220
Forget technical debt
ufried
0
160
データ定義の混乱と戦う 〜 管理会計と財務会計 〜
wonohe
0
190
色を視る
yuzneri
0
320
ServiceNow Knowledge 26 の歩き方
manarobot
0
330
EMから幅を広げるために最近挑戦していること / Recent challenges I'm undertaking to expand my horizons beyond EM
hiro_torii
1
180
音声言語モデル手法に関する発表の紹介
kzinmr
0
160
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
77
5.3k
For a Future-Friendly Web
brad_frost
183
10k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
530
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.5k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.3k
HDC tutorial
michielstock
2
650
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
AI: The stuff that nobody shows you
jnunemaker
PRO
6
620
Into the Great Unknown - MozCon
thekraken
41
2.4k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
190
Transcript
Future in WebApp Kengo TODA
Agenda • What is Future • What is CompletableFuture •
Common usage in WebApp
What is Future? • Proxy interface to get result of
async operation • Similar with JavaScript’s Promise
Ask, and it will be given to you
How to implement method which returns Future instance? • Asynchronous
Method Invocation (Java EE 6) • Creating Asynchronous Methods (Spring Framework)
What is CompletableFuture • New class from Java8, implements Future
interface • Similar with ListenableFuture in Guava and Spring Framework
Apply result to Function,
or combine them.
Merit: connect result of Async I/O seamlessly auth add new
post load timeline START END
None
When we use them? • When call async I/O •
Datastore • Message Queue • Cache • RESTful API
Example: When we use them? • If you are service
provider, • Public service API (interface for user) should return CompletableFuture instance if it may use I/O internally. • Then during I/O is running, your user can use current thread for other usage.
Keywords to google • Promise, Future • CompletableFuture • ListenableFuture
(Guava & Spring Framework) • Function composition