|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrx.operators.OperationSynchronize<T>
T - The type of the observable sequence.public final class OperationSynchronize<T>
Wraps an Observable in another Observable that ensures that the resulting Observable is chronologically well-behaved.
A well-behaved Observable does not interleave its invocations of the onNext,
onCompleted, and onError methods of its Observers; it invokes
onCompleted or onError only once; and it never invokes
onNext after invoking either onCompleted or onError. The
synchronize operation enforces this, and the Observable it returns invokes onNext
and onCompleted or onError synchronously.
NOTE: Observable.create(rx.Observable.OnSubscribeFunc already wraps Observables so this is generally redundant.
| Constructor Summary | |
|---|---|
OperationSynchronize()
|
|
| Method Summary | ||
|---|---|---|
static
|
synchronize(Observable<? extends T> observable)
Accepts an observable and wraps it in another observable which ensures that the resulting observable is well-behaved. |
|
static
|
synchronize(Observable<? extends T> observable,
java.lang.Object lock)
Accepts an observable and wraps it in another observable which ensures that the resulting observable is well-behaved. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OperationSynchronize()
| Method Detail |
|---|
public static <T> Observable.OnSubscribeFunc<T> synchronize(Observable<? extends T> observable)
T - observable -
public static <T> Observable.OnSubscribeFunc<T> synchronize(Observable<? extends T> observable,
java.lang.Object lock)
T - observable - lock - The lock object to synchronize each observer call on
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||