๐งถ ์์ฑ
Create
https://reactivex.io/
- Observable ์์ฑ
Just
https://reactivex.io/documentation/operators/just.html
- ํ๋์ item๋ง ๋ฐฉ์ถ(emit)ํ๋ observable ์์ฑ
From
https://reactivex.io/documentation/operators/from.html
- ๋ค์ํ ๊ฐ์ฒด์ ๋ฐ์ดํฐ ์ ํ์ observable๋ก ๋ณํ
- e.g. ๋ฆฌ์คํธ๋ฅผ Flux๋ก ๋ณํ
Empty
https://reactivex.io/documentation/operators/empty-never-throw.html
- ๋น observable ์์ฑ
Defer
https://reactivex.io/documentation/operators/defer.html
- observer๊ฐ ๊ตฌ๋ ํ ๋๊น์ง observable์ ์์ฑํ์ง ์๊ณ , ๊ฐ observer์ ๋ํด ์๋ก์ด observable ์์ฑ
๐ฎ ๋ณํ
flatMap
https://reactivex.io/
๋น๋๊ธฐ ์ฒ๋ฆฌ
groupBy
https://reactivex.io/
- Obsevable์ ๊ธฐ์ค์ ๋ฐ๋ผ ๊ทธ๋ฃน์ผ๋ก obsevable ๋ฐฉ์ถ
map
https://reactivex.io/
๋๊ธฐ ์ฒ๋ฆฌ
์ ๋ ฅ๊ณผ ๋ฆฌํด ๊ฐ์
Mono<T>
๐ ํํฐ
distinct
- ์ค๋ณต์ ์์ค observable ๋ฐํ
filter
- ์กฐ๊ฑด์ ๋ง์กฑํ๋ ํญ๋ชฉ๋ง ๋ฐฉ์ถ
elementAt
https://reactivex.io/
- Flux์์ i๋ฒ์งธ ์์๋ฅผ Mono๋ก ๋ฐํ
ignoreElements
https://reactivex.io/
- Observable์ ํญ๋ชฉ์ ๋ด๋ณด๋ด์ง ์๊ณ ์ข ๋ฃ ์๋ฆผ ๋ฐ์
- Observable์ ์ฌ์ฉํ์ง ์๊ณ ์ข ๋ฃํ ๋ ์ด์ฉ
- onNext ํธ๋ค๋ฌ๊ฐ ํธ์ถ๋์ง ์๋๋ค.
take
https://reactivex.io/
- ์์์ n๊ฐ์ ์์ ๋ฐฉ์ถ
๐งฉ ๊ฒฐํฉ
merge
https://reactivex.io/
- ์ฌ๋ฌ observable์ ํฉ์ณ์ ํ๋์ observable ๋ฐํ
startWith
https://reactivex.io/
- Observable์ ํญ๋ชฉ์ ๋ฐฉ์ถํ๊ธฐ ์ ์ ์ง์ ๋ ํญ๋ชฉ์ ์ถ๊ฐ
zip
https://reactivex.io/
- ์ฌ๋ฌ observable์ ๋ฐฉ์ถ์ ๊ฒฐํฉํ์ฌ ํ๋์ observable๋ก ๋ฐฉ์ถ
๐ ์ค๋ฅ ์ฒ๋ฆฌ
onErrorResume
https://reactivex.io/
- error ์ ํธ ์ฒ๋ฆฌ
try-catch ๋ฌธ์์ catch์ ์ ์ฌ
retry
https://reactivex.io/
- error ์ ํธ๊ฐ ๋ฐ์ํ๋ฉด ๋ค์ ์คํ
๐ฎ ์ ํธ๋ฆฌํฐ
delay
- Observable์์ ๋ฐฉ์ถ ์์ ์ ํน์ ์๊ฐ๋งํผ ์์ผ๋ก ์ด๋
do
https://reactivex.io/
- ์๋ณธ ์ํ์ค์ ์ํฅ์ ์ฃผ์ง ์๊ณ ์ฒ๋ฆฌ ๋ก์ง ์ถ๊ฐ
- ์ฃผ๋ก ์ํ์ค์ ์ ํธ๋ฅผ ์ก์์ ์ฌ์ฉ
- e.g. doOnNext, doOnComplete, doOnError ๋ฑ
serialize
https://reactivex.io/
- Observable์ด ์ง๋ ฌํ๋ ํธ์ถ์ ์ํํ๊ณ ์ฌ๋ฐ๋ฅด๊ฒ ์๋ํ๋๋ก ๊ฐ์
subscribe
- Observable ๋ฐฉ์ถ ๋ฐ ์๋ฆผ์ ๋ฐ๋ผ ์๋
- e.g. onNext, onError, onComplete
๊ตฌ๋ ํ์ง ์์ Observable์ ์ฒ๋ฆฌ๋์ง ์๋๋ค.
timestamp
https://reactivex.io/
- ๊ฐ ํญ๋ชฉ์ ํ์์คํฌํ ์ถ๊ฐ
๐ ์กฐ๊ฑด
all
https://reactivex.io/
- Observable์ด ๋ด๋ณด๋ธ ๋ชจ๋ ํญ๋ชฉ์ด ์กฐ๊ฑด์ ๋ง์กฑํ๋์ง ์ฌ๋ถ ๋ฐํ
contains
https://reactivex.io/
- Observable์ด ํน์ ํญ๋ชฉ์ ๋ฐฉ์ถํ๋์ง ์ฌ๋ถ ๋ฐํ
defaultIfEmpty
https://reactivex.io/
- Observable์ด ์๋ฌด๊ฒ๋ ๋ฐฉ์ถํ์ง ์์ ๋ ํน์ ํญ๋ชฉ ๋ฐํ
skipWhile
https://reactivex.io/
- ์กฐ๊ฑด์ ๋ง์กฑํ์ง ์์ ๋๊น์ง ๋ฐฉ์ถ๋ ํญ๋ชฉ ๋ฌด์
takeWhile
https://reactivex.io/
- ์กฐ๊ฑด์ ๋ง์กฑํ์ง ์์ ํ observable์ด ๋ด๋ณด๋ธ ํญ๋ชฉ ๋ฌด์
๐ ์ง๊ณ
average
- ๋ค์ ์๋ฃํ์ ๋ถ์ฌ์ ์ฌ์ฉ
- ํ๊ท ์ Mono๋ก ๋ฐํ
count
- ์กฐ๊ฑด์ ๋ง์กฑํ๋ item์ ๊ฐ์๋ฅผ ์นด์ดํ ํ์ฌ Mono๋ก ๋ฐํ
max
- ์ต๋๊ฐ
min
- ์ต์๊ฐ
sum
- ํฉ
reduce
https://reactivex.io/
- ์ํ์ค์ ๊ฐ item์ ํจ์๋ฅผ ์์ฐจ์ ์ผ๋ก ์ ์ฉํ๊ณ ์ต์ข ๊ฐ ๋ฐํ