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
Transition at RxJava 1.x to 2.x
Search
Ryutaro Miyashita
February 01, 2017
Technology
0
510
Transition at RxJava 1.x to 2.x
第2回スタートアップAndroid勉強会
https://connpass.com/event/48090/
Ryutaro Miyashita
February 01, 2017
Tweet
Share
More Decks by Ryutaro Miyashita
See All by Ryutaro Miyashita
Java で書かれた Android アプリを Kotlin で書き直すまでの話 / Talk of rewrite Android app for Java to Kotlin
ryugoo
0
1.6k
開発 4 年目のアプリへの Kotlin 導入
ryugoo
0
400
チーム開発と Android アプリの構成
ryugoo
5
1.1k
開発 4 年目のアプリへの Kotlin 導入
ryugoo
1
2.5k
Either で想定内のエラーと想定外のエラーを別ものにしたい!
ryugoo
2
1.6k
全て S になる -RxJava と LWS を持ち込む楽しさ-
ryugoo
4
680
Kotlin さんと誕生日が近いだけの男の話
ryugoo
2
490
Android エンジニアになって 2 年の学び
ryugoo
1
2.6k
年末だしお掃除をしよう!
ryugoo
0
750
Other Decks in Technology
See All in Technology
20分で分かるIAM全機能 (拡大版) / 20240903-jawsug-yokohama-iam
opelab
3
140
Envoy External AuthZとgRPC Extensionを利用した「頑張らない」Microservices認証認可基盤
andoshin11
0
220
CRTO/CRTL/OSEPの比較・勉強法とAV/EDRの検知実験
chayakonanaika
1
1.1k
OCI で始める!! Red Hat OpenShift / Get Started OpenShift on OCI
oracle4engineer
PRO
1
120
OR学会2024秋_短期収益と将来のオフ方策評価性能を考慮したクーポン割当方策混合比の決定
recruitengineers
PRO
4
410
Oracle Cloud Infrastructure IaaS 新機能アップデート 2024/6 - 2024/8
oracle4engineer
PRO
0
110
Privacy Sandbox on Android / DroidKaigi 2024
7pairs
1
160
プロダクトエンジニアを支えるための開発生産性向上施策
tsukakei
0
130
20240911_New_Relicダッシュボード活用例
speakerdeckfk
0
100
2024年版 運用者たちのLLM
nwiizo
3
540
事前準備が肝!AI活用のための業務改革
layerx
PRO
1
130
サーバレスでモバイルアプリ開発! NTTコム「ビジネスdアプリ」のアーキテクチャ / The architecture of business d app
nttcom
12
220
Featured
See All Featured
Bash Introduction
62gerente
608
210k
Rails Girls Zürich Keynote
gr2m
93
13k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
45
4.8k
Six Lessons from altMBA
skipperchong
26
3.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Dealing with People You Can't Stand - Big Design 2015
cassininazir
363
22k
Designing with Data
zakiwarfel
98
5k
A designer walks into a library…
pauljervisheath
201
24k
The Language of Interfaces
destraynor
153
23k
Debugging Ruby Performance
tmm1
72
12k
Git: the NoSQL Database
bkeepers
PRO
425
64k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Transcript
5SBOTJUJPOBU3Y+BWBYUPY 3Y+BWBYַ3Y+BWBYפך獳遤
3ZVUBSP.JZBTIJUB $IBU8PSL !SZVHPP@
3Y+BWB 3FBDUJWF&YUFOTJPOTGPSUIF+7. "OESPJE涪ַ鋅גծ葿ղדֹ ؝ؙٖءّٝ乼⡲ "TZOD5BTLך➿
%BUBCJOEJOH +BWB"1*ך➿ 4USFBN 0QUJPOBM &WFOU#VT
3Y+BWBY 㸜㹀晛ٔٔ٦أ 3FBDUJWF4USFBNTך➬圫彊䬿 ➭ך㹋鄲חכ"LLB4USFBNTהַ 3Y+BWBYַ㢌刿ָֿֿ֮
3Y+BWBYח獳遤ׅ (JU)VCך8IBUˏTEJFSFODFJO铣 ֻֻה"1*刿倜ׅ 3Y+BWB鸬䵿ٓ؎ـٓٔ،حفر٦زׅ ⹛⡲然钠
/POOVMM Observable.<Void>create(emitter -> { emitter.onNext(null); // NPE });
/POOVMM enum Notification { INSTANCE; } Observable.<Object>create(emitter -> { emitter.onNext(Notification.INSTANCE);
});
/POOVMM OVMMFNJUֿׅהכדֹזְ 0CTFSWBCMF7PJEכ0CTFSWBCMF0CKFDUד FOVNך⦼FNJUׅ״ֲח㢌ִ NBQؔلٖ٦ة٦זודSFUVSOOVMMׯג ⢽ִל/VMM0CKFDUػة٦ٝד㼎䘔ׅ
-JHIUXFJHIU4USFBN"1*ה穈さׇג ⦼0QUJPOBMדٓحفׅך葺ְַ
,JDLTUBSUFSBOESPJEPTT
#BDLQSFTTVSF Y List<Integer> nums; // Huge list Observable<Integer>create(emitter -> {
for (int i : nums) { emitter.onNext(i); } }) .onBackPressureBuffer() .subscribe(i -> { /* ignored */ });
#BDLQSFTTVSF Y List<Integer> nums; // Huge list Flowable<Integer>create(emitter -> {
for (int i : nums) { emitter.onNext(i); } }, BackpressureStrategy.BUFFER) .subscribe(i -> { /* ignored */ });
#BDLQSFTTVSF 0CTFSWBCMFד#BDLQSFTTVSFכ《䪔ִזְ 'MPXBCMF⢪ֲ 0CTFSWBCMFה'MPXBCMF幉㖈ׇׁהֹכ岣䠐 0CTFSWBCMFUP'MPXBCMF
'MPXBCMFUP0CTFSWBCMF 'MPXBCMFח㺔ׇ倯ָ#BDLQSFTTVSFח㼎䘔דֲֹ
4VCKFDU Y Subject<String, String> subject = new SerializedSubject( PublishSubject.create());
4VCKFDU Y Subject<String> subject = PublishSubject.<String>create() .toSerialized(); Processor<String, String> processor
= PublishProcessor.<String>create() .toSerialized();
4VCKFDU 4FSJBMJ[FE4VCKFDUכOFXדכזֻ 傀㶷ך4VCKFDUַUP4FSJBMJ[FEًاحسד⡲ 4VCKFDUדכ#BDLQSFTTVSFכ《䪔ִזְ 1SPDFTTPS⢪ֲ
4DIFEVMFST Y .subscribeOn(Schedulers.immediate())
4DIFEVMFST Y .subscribeOn(Schedulers.trampoline())
4DIFEVMFST 4DIFEVMFSTJNNFEJBUFכYדכ㶷㖈׃זְ ➿חUSBNQPMJOF⢪ֲ 5ISFBE-PDBMחُؗ٦؎ؚٝ׃ג鷵如Ⳣ椚
3Y#JOEJOH 3Y#JOEJOHכ7JFXך؎كٝز 0CTFSWBCMFח㢌䳔׃גֻ ⥋걾ה㸜䗰ך+BLF8IBSUPO⯓欰⡲ㅷ 植㖈NBTUFSـٓٝثָ3Y+BWBYח 㼎䘔׃גְָծ姻䒭ٔٔ٦أָת
3Y#JOEJOH allprojects { repositories { maven { url 'https://jitpack.io' }
} } compile 'com.github.JakeWharton.RxBinding:rxbinding:71f3a1b' CVJMEHSBEMF SPPU CVJMEHSBEMF BQQ ˟SYCJOEJOHBQQDPNQBUWװSYCJOEJOHTVQQPSUWず圫ךغ٦آّٝ䭷㹀ד0,
3Y+BWBYח獳遤׃ג ֻֻה堣唒涸ח縧ֹ䳔ִגְֻ OVMMFNJU׃גה/1&חזךד岣䠐ָ䗳銲 ずׄせך"1*ד䮙⹛ָ㢌גך،ٔ ⢽ִל0CTFSWBCMFUP-JTUכ4JOHMF鵤ׅ
4JOHMF.BZCF$PNQMFUBCMF鵤ׅ㢌刿כ㢳ְ 8IBUTEJFSFOUJO擾铣ׅץ׃ ㉏겗搀ֻ麊欽דֹגְ
&OKPZ3Y4USFBN-JGF