Package | Description |
---|---|
rx |
Base reactive classes: Observable, Single and Completable; base reactive consumers;
other common base interfaces.
|
rx.plugins |
Callback types and a central plugin handler class to hook into the lifecycle
of the base reactive types and schedulers.
|
rx.schedulers |
Scheduler implementations, value+time record classes and the standard factory class to
return standard RxJava schedulers or wrap any Executor-based (thread pool) instances.
|
rx.subjects |
Classes extending the Observable base reactive class and implementing
the Observer interface at the same time (aka hot Observables).
|
Modifier and Type | Method and Description |
---|---|
<S extends Scheduler & Subscription> |
Scheduler.when(Func1<Observable<Observable<Completable>>,Completable> combine)
Allows the use of operators for controlling the timing around when
actions scheduled on workers are actually done.
|
Modifier and Type | Method and Description |
---|---|
Observable<List<T>> |
Observable.buffer(long timespan,
long timeshift,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits buffers of items it collects from the source Observable.
|
Observable<List<T>> |
Observable.buffer(long timespan,
TimeUnit unit,
int count,
Scheduler scheduler)
Returns an Observable that emits buffers of items it collects from the source Observable.
|
Observable<List<T>> |
Observable.buffer(long timespan,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits buffers of items it collects from the source Observable.
|
Observable<T> |
Observable.debounce(long timeout,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that mirrors the source Observable, except that it drops items emitted by the
source Observable that are followed by newer items before a timeout value expires on a specified
Scheduler.
|
Completable |
Completable.delay(long delay,
TimeUnit unit,
Scheduler scheduler)
Returns a Completable which delays the emission of the completion event by the given time while
running on the specified scheduler.
|
Observable<T> |
Observable.delay(long delay,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits the items emitted by the source Observable shifted forward in time by a
specified delay.
|
Single<T> |
Single.delay(long delay,
TimeUnit unit,
Scheduler scheduler)
Returns an Single that emits the items emitted by the source Single shifted forward in time by a
specified delay.
|
Completable |
Completable.delay(long delay,
TimeUnit unit,
Scheduler scheduler,
boolean delayError)
Returns a Completable which delays the emission of the completion event, and optionally the error as well, by the given time while
running on the specified scheduler.
|
Observable<T> |
Observable.delaySubscription(long delay,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that delays the subscription to the source Observable by a given amount of time,
both waiting and subscribing on a given Scheduler.
|
static <T> Observable<T> |
Observable.from(Future<? extends T> future,
Scheduler scheduler)
|
static <T> Single<T> |
Single.from(Future<? extends T> future,
Scheduler scheduler)
|
static Observable<Long> |
Observable.interval(long initialDelay,
long period,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits a
0L after the initialDelay and ever increasing numbers
after each period of time thereafter, on a specified Scheduler . |
static Observable<Long> |
Observable.interval(long interval,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits a sequential number every specified interval of time, on a
specified Scheduler.
|
Completable |
Completable.observeOn(Scheduler scheduler)
Returns a Completable which emits the terminal events from the thread of the specified scheduler.
|
Observable<T> |
Observable.observeOn(Scheduler scheduler)
Modifies an Observable to perform its emissions and notifications on a specified
Scheduler ,
asynchronously with a bounded buffer of RxRingBuffer.SIZE slots. |
Single<T> |
Single.observeOn(Scheduler scheduler)
Modifies a Single to emit its item (or notify of its error) on a specified
Scheduler ,
asynchronously. |
Observable<T> |
Observable.observeOn(Scheduler scheduler,
boolean delayError)
Modifies an Observable to perform its emissions and notifications on a specified
Scheduler ,
asynchronously with a bounded buffer and optionally delays onError notifications. |
Observable<T> |
Observable.observeOn(Scheduler scheduler,
boolean delayError,
int bufferSize)
Modifies an Observable to perform its emissions and notifications on a specified
Scheduler ,
asynchronously with a bounded buffer of configurable size and optionally delays onError notifications. |
Observable<T> |
Observable.observeOn(Scheduler scheduler,
int bufferSize)
Modifies an Observable to perform its emissions and notifications on a specified
Scheduler ,
asynchronously with a bounded buffer of configurable size. |
static Observable<Integer> |
Observable.range(int start,
int count,
Scheduler scheduler)
Returns an Observable that emits a sequence of Integers within a specified range, on a specified
Scheduler.
|
Observable<T> |
Observable.repeat(long count,
Scheduler scheduler)
Returns an Observable that repeats the sequence of items emitted by the source Observable at most
count times, on a particular Scheduler. |
Observable<T> |
Observable.repeat(Scheduler scheduler)
Returns an Observable that repeats the sequence of items emitted by the source Observable indefinitely,
on a particular Scheduler.
|
Observable<T> |
Observable.repeatWhen(Func1<? super Observable<? extends Void>,? extends Observable<?>> notificationHandler,
Scheduler scheduler)
Returns an Observable that emits the same values as the source Observable with the exception of an
onCompleted . |
<R> Observable<R> |
Observable.replay(Func1<? super Observable<T>,? extends Observable<R>> selector,
int bufferSize,
long time,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits items that are the results of invoking a specified selector on items
emitted by a
ConnectableObservable that shares a single subscription to the source Observable,
replaying no more than bufferSize items that were emitted within a specified time window. |
<R> Observable<R> |
Observable.replay(Func1<? super Observable<T>,? extends Observable<R>> selector,
int bufferSize,
Scheduler scheduler)
Returns an Observable that emits items that are the results of invoking a specified selector on items
emitted by a
ConnectableObservable that shares a single subscription to the source Observable,
replaying a maximum of bufferSize items. |
<R> Observable<R> |
Observable.replay(Func1<? super Observable<T>,? extends Observable<R>> selector,
long time,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits items that are the results of invoking a specified selector on items
emitted by a
ConnectableObservable that shares a single subscription to the source Observable,
replaying all items that were emitted within a specified time window. |
<R> Observable<R> |
Observable.replay(Func1<? super Observable<T>,? extends Observable<R>> selector,
Scheduler scheduler)
Returns an Observable that emits items that are the results of invoking a specified selector on items
emitted by a
ConnectableObservable that shares a single subscription to the source Observable. |
ConnectableObservable<T> |
Observable.replay(int bufferSize,
long time,
TimeUnit unit,
Scheduler scheduler)
Returns a
ConnectableObservable that shares a single subscription to the source Observable and
that replays a maximum of bufferSize items that are emitted within a specified time window. |
ConnectableObservable<T> |
Observable.replay(int bufferSize,
Scheduler scheduler)
Returns a
ConnectableObservable that shares a single subscription to the source Observable and
replays at most bufferSize items emitted by that Observable. |
ConnectableObservable<T> |
Observable.replay(long time,
TimeUnit unit,
Scheduler scheduler)
Returns a
ConnectableObservable that shares a single subscription to the source Observable and
replays all items emitted by that Observable within a specified time window. |
ConnectableObservable<T> |
Observable.replay(Scheduler scheduler)
Returns a
ConnectableObservable that shares a single subscription to the source Observable that
will replay all of its items and notifications to any future Observer on the given
Scheduler . |
Observable<T> |
Observable.retryWhen(Func1<? super Observable<? extends Throwable>,? extends Observable<?>> notificationHandler,
Scheduler scheduler)
Returns an Observable that emits the same values as the source observable with the exception of an
onError . |
Observable<T> |
Observable.sample(long period,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits the most recently emitted item (if any) emitted by the source Observable
within periodic time intervals, where the intervals are defined on a particular Scheduler.
|
Observable<T> |
Observable.skip(long time,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that skips values emitted by the source Observable before a specified time window
on a specified
Scheduler elapses. |
Observable<T> |
Observable.skipLast(long time,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that drops items emitted by the source Observable during a specified time window
(defined on a specified scheduler) before the source completes.
|
Completable |
Completable.subscribeOn(Scheduler scheduler)
Returns a Completable which subscribes the child subscriber on the specified scheduler, making
sure the subscription side-effects happen on that specific thread of the scheduler.
|
Observable<T> |
Observable.subscribeOn(Scheduler scheduler)
Asynchronously subscribes Observers to this Observable on the specified
Scheduler . |
Single<T> |
Single.subscribeOn(Scheduler scheduler)
Asynchronously subscribes subscribers to this Single on the specified
Scheduler . |
Observable<T> |
Observable.take(long time,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits those items emitted by source Observable before a specified time (on a
specified Scheduler) runs out.
|
Observable<T> |
Observable.takeLast(int count,
long time,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits at most a specified number of items from the source Observable that were
emitted in a specified window of time before the Observable completed, where the timing information is
provided by a given Scheduler.
|
Observable<T> |
Observable.takeLast(long time,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits the items from the source Observable that were emitted in a specified
window of time before the Observable completed, where the timing information is provided by a specified
Scheduler.
|
Observable<List<T>> |
Observable.takeLastBuffer(int count,
long time,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits a single List containing at most
count items from the source
Observable that were emitted during a specified window of time (on a specified Scheduler) before the
source Observable completed. |
Observable<List<T>> |
Observable.takeLastBuffer(long time,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits a single List containing those items from the source Observable that
were emitted during a specified window of time before the source Observable completed, where the timing
information is provided by the given Scheduler.
|
Observable<T> |
Observable.throttleFirst(long skipDuration,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits only the first item emitted by the source Observable during sequential
time windows of a specified duration, where the windows are managed by a specified Scheduler.
|
Observable<T> |
Observable.throttleLast(long intervalDuration,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits only the last item emitted by the source Observable during sequential
time windows of a specified duration, where the duration is governed by a specified Scheduler.
|
Observable<T> |
Observable.throttleWithTimeout(long timeout,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that only emits those items emitted by the source Observable that are not followed
by another emitted item within a specified time window, where the time window is governed by a specified
Scheduler.
|
Observable<TimeInterval<T>> |
Observable.timeInterval(Scheduler scheduler)
Returns an Observable that emits records of the time interval between consecutive items emitted by the
source Observable, where this interval is computed on a specified Scheduler.
|
Observable<T> |
Observable.timeout(long timeout,
TimeUnit timeUnit,
Observable<? extends T> other,
Scheduler scheduler)
Returns an Observable that mirrors the source Observable but applies a timeout policy for each emitted
item using a specified Scheduler.
|
Completable |
Completable.timeout(long timeout,
TimeUnit unit,
Scheduler scheduler)
Returns a Completable that runs this Completable and emits a TimeoutException in case
this Completable doesn't complete within the given time while "waiting" on the specified
Scheduler.
|
Observable<T> |
Observable.timeout(long timeout,
TimeUnit timeUnit,
Scheduler scheduler)
Returns an Observable that mirrors the source Observable but applies a timeout policy for each emitted
item, where this policy is governed on a specified Scheduler.
|
Single<T> |
Single.timeout(long timeout,
TimeUnit timeUnit,
Scheduler scheduler)
Returns a Single that mirrors the source Single but applies a timeout policy for its emitted item, where
this policy is governed on a specified Scheduler.
|
Completable |
Completable.timeout(long timeout,
TimeUnit unit,
Scheduler scheduler,
Completable other)
Returns a Completable that runs this Completable and switches to the other Completable
in case this Completable doesn't complete within the given time while "waiting" on
the specified scheduler.
|
Single<T> |
Single.timeout(long timeout,
TimeUnit timeUnit,
Single<? extends T> other,
Scheduler scheduler)
Returns a Single that mirrors the source Single but applies a timeout policy for its emitted item, using
a specified Scheduler.
|
Completable |
Completable.timeout0(long timeout,
TimeUnit unit,
Scheduler scheduler,
Completable other)
Returns a Completable that runs this Completable and optionally switches to the other Completable
in case this Completable doesn't complete within the given time while "waiting" on
the specified scheduler.
|
static Observable<Long> |
Observable.timer(long initialDelay,
long period,
TimeUnit unit,
Scheduler scheduler)
Deprecated.
|
static Completable |
Completable.timer(long delay,
TimeUnit unit,
Scheduler scheduler)
Returns a Completable instance that fires its onCompleted event after the given delay elapsed
by using the supplied scheduler.
|
static Observable<Long> |
Observable.timer(long delay,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits one item after a specified delay, on a specified Scheduler, and then
completes.
|
Observable<Timestamped<T>> |
Observable.timestamp(Scheduler scheduler)
Returns an Observable that emits each item emitted by the source Observable, wrapped in a
Timestamped object whose timestamps are provided by a specified Scheduler. |
Completable |
Completable.unsubscribeOn(Scheduler scheduler)
Returns a Completable which makes sure when a subscriber cancels the subscription, the
dispose is called on the specified scheduler
|
Observable<T> |
Observable.unsubscribeOn(Scheduler scheduler)
Modifies the source Observable so that subscribers will unsubscribe from it on a specified
Scheduler . |
Observable<Observable<T>> |
Observable.window(long timespan,
long timeshift,
TimeUnit unit,
int count,
Scheduler scheduler)
Returns an Observable that emits windows of items it collects from the source Observable.
|
Observable<Observable<T>> |
Observable.window(long timespan,
long timeshift,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits windows of items it collects from the source Observable.
|
Observable<Observable<T>> |
Observable.window(long timespan,
TimeUnit unit,
int count,
Scheduler scheduler)
Returns an Observable that emits windows of items it collects from the source Observable.
|
Observable<Observable<T>> |
Observable.window(long timespan,
TimeUnit unit,
Scheduler scheduler)
Returns an Observable that emits windows of items it collects from the source Observable.
|
Modifier and Type | Method and Description |
---|---|
static Scheduler |
RxJavaSchedulersHook.createComputationScheduler()
Create an instance of the default
Scheduler used for Schedulers.computation() . |
static Scheduler |
RxJavaSchedulersHook.createComputationScheduler(ThreadFactory threadFactory)
Create an instance of the default
Scheduler used for Schedulers.computation()
except using threadFactory for thread creation. |
static Scheduler |
RxJavaSchedulersHook.createIoScheduler()
Create an instance of the default
Scheduler used for Schedulers.io() . |
static Scheduler |
RxJavaSchedulersHook.createIoScheduler(ThreadFactory threadFactory)
Create an instance of the default
Scheduler used for Schedulers.io()
except using threadFactory for thread creation. |
static Scheduler |
RxJavaSchedulersHook.createNewThreadScheduler()
Create an instance of the default
Scheduler used for Schedulers.newThread() . |
static Scheduler |
RxJavaSchedulersHook.createNewThreadScheduler(ThreadFactory threadFactory)
Create an instance of the default
Scheduler used for Schedulers.newThread()
except using threadFactory for thread creation. |
Scheduler |
RxJavaSchedulersHook.getComputationScheduler()
Scheduler to return from
Schedulers.computation() or null if default should be
used. |
Scheduler |
RxJavaSchedulersHook.getIOScheduler()
Scheduler to return from
Schedulers.io() or null if default should be used. |
Scheduler |
RxJavaSchedulersHook.getNewThreadScheduler()
Scheduler to return from
Schedulers.newThread() or null if default should be used. |
static Scheduler |
RxJavaHooks.onComputationScheduler(Scheduler scheduler)
Hook to call when the Schedulers.computation() is called.
|
static Scheduler |
RxJavaHooks.onIOScheduler(Scheduler scheduler)
Hook to call when the Schedulers.io() is called.
|
static Scheduler |
RxJavaHooks.onNewThreadScheduler(Scheduler scheduler)
Hook to call when the Schedulers.newThread() is called.
|
Modifier and Type | Method and Description |
---|---|
static Func1<Scheduler,Scheduler> |
RxJavaHooks.getOnComputationScheduler()
Returns the current computation scheduler hook function or null if it is
set to the default pass-through.
|
static Func1<Scheduler,Scheduler> |
RxJavaHooks.getOnComputationScheduler()
Returns the current computation scheduler hook function or null if it is
set to the default pass-through.
|
static Func1<Scheduler,Scheduler> |
RxJavaHooks.getOnIOScheduler()
Returns the current io scheduler hook function or null if it is
set to the default pass-through.
|
static Func1<Scheduler,Scheduler> |
RxJavaHooks.getOnIOScheduler()
Returns the current io scheduler hook function or null if it is
set to the default pass-through.
|
static Func1<Scheduler,Scheduler> |
RxJavaHooks.getOnNewThreadScheduler()
Returns the current new thread scheduler hook function or null if it is
set to the default pass-through.
|
static Func1<Scheduler,Scheduler> |
RxJavaHooks.getOnNewThreadScheduler()
Returns the current new thread scheduler hook function or null if it is
set to the default pass-through.
|
Modifier and Type | Method and Description |
---|---|
static Scheduler |
RxJavaHooks.onComputationScheduler(Scheduler scheduler)
Hook to call when the Schedulers.computation() is called.
|
static Scheduler |
RxJavaHooks.onIOScheduler(Scheduler scheduler)
Hook to call when the Schedulers.io() is called.
|
static Scheduler |
RxJavaHooks.onNewThreadScheduler(Scheduler scheduler)
Hook to call when the Schedulers.newThread() is called.
|
Modifier and Type | Method and Description |
---|---|
static void |
RxJavaHooks.setOnComputationScheduler(Func1<Scheduler,Scheduler> onComputationScheduler)
Sets the hook function for returning a scheduler when the Schedulers.computation() is called
unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnComputationScheduler(Func1<Scheduler,Scheduler> onComputationScheduler)
Sets the hook function for returning a scheduler when the Schedulers.computation() is called
unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnIOScheduler(Func1<Scheduler,Scheduler> onIOScheduler)
Sets the hook function for returning a scheduler when the Schedulers.io() is called
unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnIOScheduler(Func1<Scheduler,Scheduler> onIOScheduler)
Sets the hook function for returning a scheduler when the Schedulers.io() is called
unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnNewThreadScheduler(Func1<Scheduler,Scheduler> onNewThreadScheduler)
Sets the hook function for returning a scheduler when the Schedulers.newThread() is called
unless a lockdown is in effect.
|
static void |
RxJavaHooks.setOnNewThreadScheduler(Func1<Scheduler,Scheduler> onNewThreadScheduler)
Sets the hook function for returning a scheduler when the Schedulers.newThread() is called
unless a lockdown is in effect.
|
Modifier and Type | Class and Description |
---|---|
class |
ImmediateScheduler
Deprecated.
This type was never publicly instantiable. Use
Schedulers.immediate() . |
class |
NewThreadScheduler
Deprecated.
This type was never publicly instantiable. Use
Schedulers.newThread() . |
class |
TestScheduler
The
TestScheduler is useful for debugging. |
class |
TrampolineScheduler
Deprecated.
This type was never publicly instantiable. Use
Schedulers.trampoline() . |
Modifier and Type | Method and Description |
---|---|
static Scheduler |
Schedulers.computation()
Creates and returns a
Scheduler intended for computational work. |
static Scheduler |
Schedulers.from(Executor executor)
Converts an
Executor into a new Scheduler instance. |
static Scheduler |
Schedulers.immediate()
Creates and returns a
Scheduler that executes work immediately on the current thread. |
static Scheduler |
Schedulers.io()
Creates and returns a
Scheduler intended for IO-bound work. |
static Scheduler |
Schedulers.newThread()
|
static Scheduler |
Schedulers.trampoline()
Creates and returns a
Scheduler that queues work on the current thread to be executed after the
current work completes. |
Modifier and Type | Method and Description |
---|---|
static <T> ReplaySubject<T> |
ReplaySubject.createWithTime(long time,
TimeUnit unit,
Scheduler scheduler)
Creates a time-bounded replay subject.
|
static <T> ReplaySubject<T> |
ReplaySubject.createWithTimeAndSize(long time,
TimeUnit unit,
int size,
Scheduler scheduler)
Creates a time- and size-bounded replay subject.
|
Copyright © 2022. All rights reserved.