Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Hot
@ RxSwift
https://speakerdeck.com/ukitaka/cold-at-she-nei-rxswiftmian-qiang-hui
Hot
Cold → Hot
( )Hot
Hot
Hot
• multicast / publish
• replay / replayAll
• connect / refCount
• share / shareReplay
• shareReplayLatestWh...
publish()
Question1
1,2,3
Sequence Map Hot
subscribe
Sequence Map Hot
subscribe
Answer
…
A.
!?
( )Hot
Hot
Hot
• multicast / publish
• replay / replayAll
• connect / refCount
• share / shareReplay
• shareReplayLatestWh...
Hot 1
ConnectableObservable
publish() …
ConnectableObservable
• connect()
• connect() Hot
• connect() Observer
ConnectableObservable
• observer Hot
connect()
observer subscribe
(ConnectableObservable )
ConnectableObservable Operator
• multicast()
• publish()
• replay(bufferSize:)
• replayAll()
multicast()
• Hot Subject
• multicast() Subject
Operator
multicast()
publish()
• PublishSubject multicast
• ReplaySubject multicast
replay(bufferSize:) / replayAll()
ConnectableObservable
• Cold Observable multicast() /
publish() / replay(bufferSize:) / replayAll()
ConnectableObservable
...
…
ConnectableObservable
Hot Operator
( )Hot
Hot
Hot
• multicast / publish
• replay / replayAll
• connect / refCount
• share / shareReplay
• shareReplayLatestWh...
share()
share()
ConnectableObservable
Observable
Hot
Question2
Answer
…
A.
) ?
Hot 2
: RefCount
share()
refCount()
• refCount() ConnectableObservable
Operator
refCount()
• Hot
• Hot subscribe
refCount
Hot subscribe
refCount()
• subscribe
connect()
Question3
Answer
…
A. 1,2,3
Hot
( )
Operator
shareReplay(bufferSize:)
• share + replay
• share = publish + refCount
• shareReplay = publish + refCount + replay
• Hot s...
shareReplay(bufferSize:)
• RxSwift Example
•
shareReplay(1) (
)
• RxSwift v2.5.0 shareReplay 1
share
shareReplayLatestWhileConnected()
•
•
RxSwift(RxCocoa) Driver
• ShareReplay1 connect
1 .Completed replay
.Completed
• Driv...
Hot
Hot
• ConnectableObservable connect()
• RefCount 1 subscribe
今日こそ理解するHot変換
今日こそ理解するHot変換
今日こそ理解するHot変換
今日こそ理解するHot変換
今日こそ理解するHot変換
Upcoming SlideShare
Loading in …5
×

今日こそ理解するHot変換

4,657 views

Published on

今日こそ理解するHot変換

Published in: Engineering
  • Follow the link, new dating source: ♥♥♥ http://bit.ly/2u6xbL5 ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating for everyone is here: ❶❶❶ http://bit.ly/2u6xbL5 ❶❶❶
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

今日こそ理解するHot変換

  1. 1. Hot @ RxSwift
  2. 2. https://speakerdeck.com/ukitaka/cold-at-she-nei-rxswiftmian-qiang-hui
  3. 3. Hot
  4. 4. Cold → Hot
  5. 5. ( )Hot Hot Hot • multicast / publish • replay / replayAll • connect / refCount • share / shareReplay • shareReplayLatestWhileConnected
  6. 6. publish()
  7. 7. Question1
  8. 8. 1,2,3
  9. 9. Sequence Map Hot subscribe
  10. 10. Sequence Map Hot subscribe
  11. 11. Answer …
  12. 12. A.
  13. 13. !?
  14. 14. ( )Hot Hot Hot • multicast / publish • replay / replayAll • connect / refCount • share / shareReplay • shareReplayLatestWhileConnected
  15. 15. Hot 1 ConnectableObservable
  16. 16. publish() …
  17. 17. ConnectableObservable • connect() • connect() Hot • connect() Observer
  18. 18. ConnectableObservable
  19. 19. • observer Hot connect() observer subscribe
  20. 20. (ConnectableObservable )
  21. 21. ConnectableObservable Operator • multicast() • publish() • replay(bufferSize:) • replayAll()
  22. 22. multicast() • Hot Subject • multicast() Subject Operator
  23. 23. multicast()
  24. 24. publish() • PublishSubject multicast
  25. 25. • ReplaySubject multicast replay(bufferSize:) / replayAll()
  26. 26. ConnectableObservable • Cold Observable multicast() / publish() / replay(bufferSize:) / replayAll() ConnectableObservable • ConnectableObservable connect() Hot Observable
  27. 27.
  28. 28. ConnectableObservable
  29. 29. Hot Operator
  30. 30. ( )Hot Hot Hot • multicast / publish • replay / replayAll • connect / refCount • share / shareReplay • shareReplayLatestWhileConnected
  31. 31. share()
  32. 32. share() ConnectableObservable Observable Hot
  33. 33. Question2
  34. 34. Answer …
  35. 35. A.
  36. 36. ) ?
  37. 37. Hot 2 : RefCount
  38. 38. share()
  39. 39. refCount() • refCount() ConnectableObservable Operator
  40. 40. refCount() • Hot • Hot subscribe refCount Hot subscribe
  41. 41. refCount() • subscribe connect()
  42. 42. Question3
  43. 43. Answer …
  44. 44. A. 1,2,3
  45. 45. Hot ( )
  46. 46. Operator
  47. 47. shareReplay(bufferSize:) • share + replay • share = publish + refCount • shareReplay = publish + refCount + replay • Hot subscribe replay
  48. 48. shareReplay(bufferSize:) • RxSwift Example • shareReplay(1) ( ) • RxSwift v2.5.0 shareReplay 1 share
  49. 49. shareReplayLatestWhileConnected() • • RxSwift(RxCocoa) Driver • ShareReplay1 connect 1 .Completed replay .Completed • Driver
  50. 50. Hot Hot • ConnectableObservable connect() • RefCount 1 subscribe

×