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
690
Kotlin さんと誕生日が近いだけの男の話
ryugoo
2
490
Android エンジニアになって 2 年の学び
ryugoo
1
2.6k
年末だしお掃除をしよう!
ryugoo
0
760
Other Decks in Technology
See All in Technology
DroidKaigi 2024 たすけて!ViewModel
mhidaka
5
880
グイグイ系QAマネージャーの仕事
sadonosake
0
290
あなたの知らないiOS開発の世界
recruitengineers
PRO
3
170
eBPFのこれまでとこれから
yutarohayakawa
9
3.1k
Tricentisにおけるテスト自動化へのAI活用ご紹介/20240910Shunsuke Katakura
shift_evolve
0
180
Oracle Autonomous Database:サービス概要のご紹介
oracle4engineer
PRO
1
7k
再考 アクターモデル/ reconsider actor model
ytake
0
310
アプリをリリースできる状態に保ったまま 段階的にリファクタリングするための 戦略と戦術 / Strategies and tactics for incremental refactoring
yanzm
6
1.3k
どこよりも遅めなWinActor Ver.7.5.0 新機能紹介
tamai_63
0
200
プロダクトエンジニアを支えるための開発生産性向上施策
tsukakei
0
140
ロリポップ! for Gamersを支えるインフラ/lolipop for gamers infrastructure
takumakume
0
130
Google CloudのLLM活用の選択肢を広げるVertex AIのパートナーモデル
nayuts
0
130
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
0
97
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
5
480
How GitHub Uses GitHub to Build GitHub
holman
472
290k
Designing the Hi-DPI Web
ddemaree
278
34k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.4k
The Cost Of JavaScript in 2023
addyosmani
42
5.6k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
663
120k
Automating Front-end Workflow
addyosmani
1365
200k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
45
4.8k
The Illustrated Children's Guide to Kubernetes
chrisshort
47
48k
From Idea to $5000 a Month in 5 Months
shpigford
379
46k
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