본문
171225(월) - RxJava2 (interval)
Mobile/RxJava2 2017. 12. 26. 00:11
RxJava2
interval
interval
@CheckReturnValue @BackpressureSupport(value=ERROR) @SchedulerSupport(value="io.reactivex:computation") public static Flowable<java.lang.Long> interval(long initialDelay, long period, java.util.concurrent.TimeUnit unit)
Returns a Flowable that emits a
0L after the initialDelay and ever increasing numbers after each period of time thereafter.
- Backpressure:
- The operator generates values based on time and ignores downstream backpressure which may lead to
MissingBackpressureExceptionat some point in the chain. Consumers should consider applying one of theonBackpressureXXXoperators as well. - Scheduler:
intervaloperates by default on thecomputationScheduler.
- Parameters:
initialDelay- the initial delay time to wait before emitting the first value of 0Lperiod- the period of time between emissions of the subsequent numbersunit- the time unit for bothinitialDelayandperiod- Returns:
- a Flowable that emits a 0L after the
initialDelayand ever increasing numbers after eachperiodof time thereafter - Since:
- 1.0.12
- See Also:
- ReactiveX operators documentation: Interval
interval
@CheckReturnValue @BackpressureSupport(value=ERROR) @SchedulerSupport(value="custom") public static Flowable<java.lang.Long> interval(long initialDelay, long period, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
Returns a Flowable that emits a
0L after the initialDelay and ever increasing numbers after each period of time thereafter, on a specified Scheduler.
- Backpressure:
- The operator generates values based on time and ignores downstream backpressure which may lead to
MissingBackpressureExceptionat some point in the chain. Consumers should consider applying one of theonBackpressureXXXoperators as well. - Scheduler:
- You specify which
Schedulerthis operator will use.
- Parameters:
initialDelay- the initial delay time to wait before emitting the first value of 0Lperiod- the period of time between emissions of the subsequent numbersunit- the time unit for bothinitialDelayandperiodscheduler- the Scheduler on which the waiting happens and items are emitted- Returns:
- a Flowable that emits a 0L after the
initialDelayand ever increasing numbers after eachperiodof time thereafter, while running on the given Scheduler - Since:
- 1.0.12
- See Also:
- ReactiveX operators documentation: Interval
interval
@CheckReturnValue @BackpressureSupport(value=ERROR) @SchedulerSupport(value="io.reactivex:computation") public static Flowable<java.lang.Long> interval(long period, java.util.concurrent.TimeUnit unit)
Returns a Flowable that emits a sequential number every specified interval of time.

- Backpressure:
- The operator signals a
MissingBackpressureExceptionif the downstream is not ready to receive the next value. - Scheduler:
intervaloperates by default on thecomputationScheduler.
- Parameters:
period- the period size in time units (see below)unit- time units to use for the interval size- Returns:
- a Flowable that emits a sequential number each time interval
- See Also:
- ReactiveX operators documentation: Interval
interval
@CheckReturnValue @BackpressureSupport(value=ERROR) @SchedulerSupport(value="custom") public static Flowable<java.lang.Long> interval(long period, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
Returns a Flowable that emits a sequential number every specified interval of time, on a specified Scheduler.

- Backpressure:
- The operator generates values based on time and ignores downstream backpressure which may lead to
MissingBackpressureExceptionat some point in the chain. Consumers should consider applying one of theonBackpressureXXXoperators as well. - Scheduler:
- You specify which
Schedulerthis operator will use.
- Parameters:
period- the period size in time units (see below)unit- time units to use for the interval sizescheduler- the Scheduler to use for scheduling the items- Returns:
- a Flowable that emits a sequential number each time interval
- See Also:
- ReactiveX operators documentation: Interval
'Mobile > RxJava2' 카테고리의 다른 글
| 180103(수) - RxJava2 (range) (0) | 2018.01.03 |
|---|---|
| 180102(화) - RxJava2 (Just) (0) | 2018.01.02 |
| RxJava2 (from) (0) | 2017.12.18 |
| 171215(금) - RxJava2 (empty/never/error) (0) | 2017.12.15 |
| 171214(목) - RxJava2 (defer) (0) | 2017.12.14 |
댓글