Top Description Inners Fields Constructors Methods
io.reactivex.rxjava3.internal.operators.mixed

public final Class ObservableSwitchMapCompletable<T>

extends Completable
Class Inheritance
Type Parameters
<T>
the upstream value type
Imports
java.util.Objects, java.util.concurrent.atomic.AtomicReference, io.reactivex.rxjava3.core.*, io.reactivex.rxjava3.disposables.Disposable, io.reactivex.rxjava3.exceptions.Exceptions, io.reactivex.rxjava3.functions.Function, io.reactivex.rxjava3.internal.disposables.DisposableHelper, io.reactivex.rxjava3.internal.util.AtomicThrowable, io.reactivex.rxjava3.plugins.RxJavaPlugins

Maps the upstream values into CompletableSources, subscribes to the newer one while disposing the subscription to the previous CompletableSource, thus keeping at most one active CompletableSource running.

History: 2.1.11 - experimental

Since
2.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final boolean
pack-priv final Function<? super T, ? extends CompletableSource>
pack-priv final Observable<T>

Constructor Summary

AccessConstructor and Description
public
ObservableSwitchMapCompletable(Observable<T> source, Function<? super T, ? extends CompletableSource> mapper, boolean delayErrors)

Method Summary

Modifier and TypeMethod and Description
protected void
Inherited from io.reactivex.rxjava3.core.Completable:
ambambArrayambWithandThenandThenandThenandThenandThenblockingAwaitblockingAwaitblockingSubscribeblockingSubscribeblockingSubscribeblockingSubscribecachecompletecomposeconcatconcatconcatconcatArrayconcatArrayDelayErrorconcatDelayErrorconcatDelayErrorconcatDelayErrorconcatWithcreatedeferdelaydelaydelaydelaySubscriptiondelaySubscriptiondoAfterTerminatedoFinallydoOnCompletedoOnDisposedoOnErrordoOnEventdoOnLifecycledoOnSubscribedoOnTerminateerrorerrorfromActionfromCallablefromCompletionStagefromFuturefromMaybefromObservablefromPublisherfromRunnablefromSinglefromSupplierhideliftmaterializemergemergemergemergeArraymergeArrayDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeWithneverobserveOnonErrorCompleteonErrorCompleteonErrorResumeNextonErrorResumeWithonErrorReturnonErrorReturnItemonTerminateDetachrepeatrepeatrepeatUntilrepeatWhenretryretryretryretryretryretryUntilretryWhensafeSubscribesequenceEqualstartWithstartWithstartWithstartWithstartWithsubscribesubscribesubscribesubscribesubscribesubscribeActualsubscribeOnsubscribeWithswitchOnNextswitchOnNextDelayErrortakeUntiltesttesttimeouttimeouttimeouttimeouttimertimertotoCompletionStagetoFlowabletoFuturetoMaybetoObservabletoSingletoSingleDefaultunsafeCreateunsubscribeOnusingusingwrap

Field Detail

delayErrorsback to summary
pack-priv final boolean delayErrors
mapperback to summary
pack-priv final Function<? super T, ? extends CompletableSource> mapper
sourceback to summary
pack-priv final Observable<T> source

Constructor Detail

ObservableSwitchMapCompletableback to summary
public ObservableSwitchMapCompletable(Observable<T> source, Function<? super T, ? extends CompletableSource> mapper, boolean delayErrors)

Method Detail

subscribeActualback to summary
protected void subscribeActual(CompletableObserver observer)
Annotations
@Override
io.reactivex.rxjava3.internal.operators.mixed back to summary

pack-priv final Class ObservableSwitchMapCompletable.SwitchMapCompletableObserver<T>

extends Object
implements Observer<T>, Disposable
Class Inheritance
  • java.lang.Object
  • io.reactivex.rxjava3.internal.operators.mixed.ObservableSwitchMapCompletable.SwitchMapCompletableObserver
All Implemented Interfaces
io.reactivex.rxjava3.disposables.Disposable, io.reactivex.rxjava3.core.Observer

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final boolean
pack-priv volatile boolean
pack-priv final CompletableObserver
pack-priv final AtomicThrowable
pack-priv final AtomicReference<ObservableSwitchMapCompletable.SwitchMapCompletableObserver.SwitchMapInnerObserver>
pack-priv static final ObservableSwitchMapCompletable.SwitchMapCompletableObserver.SwitchMapInnerObserver
pack-priv final Function<? super T, ? extends CompletableSource>
pack-priv Disposable

Constructor Summary

AccessConstructor and Description
pack-priv
SwitchMapCompletableObserver(CompletableObserver downstream, Function<? super T, ? extends CompletableSource> mapper, boolean delayErrors)

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Implements io.reactivex.rxjava3.disposables.Disposable.dispose.

Dispose the resource, the operation should be idempotent.
pack-priv void
pack-priv void
pack-priv void
public boolean
isDisposed()

Implements io.reactivex.rxjava3.disposables.Disposable.isDisposed.

Returns true if this resource has been disposed.
public void
onComplete()

Implements io.reactivex.rxjava3.core.Observer.onComplete.

Notifies the Observer that the Observable has finished sending push-based notifications.
public void
public void
onNext(T
the item emitted by the Observable
t
)

Implements io.reactivex.rxjava3.core.Observer.onNext.

Provides the Observer with a new item to observe.
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delayErrorsback to summary
pack-priv final boolean delayErrors
doneback to summary
pack-priv volatile boolean done
downstreamback to summary
pack-priv final CompletableObserver downstream
errorsback to summary
pack-priv final AtomicThrowable errors
innerback to summary
pack-priv final AtomicReference<ObservableSwitchMapCompletable.SwitchMapCompletableObserver.SwitchMapInnerObserver> inner
INNER_DISPOSEDback to summary
pack-priv static final ObservableSwitchMapCompletable.SwitchMapCompletableObserver.SwitchMapInnerObserver INNER_DISPOSED
mapperback to summary
pack-priv final Function<? super T, ? extends CompletableSource> mapper
upstreamback to summary
pack-priv Disposable upstream

Constructor Detail

SwitchMapCompletableObserverback to summary
pack-priv SwitchMapCompletableObserver(CompletableObserver downstream, Function<? super T, ? extends CompletableSource> mapper, boolean delayErrors)

Method Detail

disposeback to summary
public void dispose()

Implements io.reactivex.rxjava3.disposables.Disposable.dispose.

Doc from io.reactivex.rxjava3.disposables.Disposable.dispose.

Dispose the resource, the operation should be idempotent.

Annotations
@Override
disposeInnerback to summary
pack-priv void disposeInner()
innerCompleteback to summary
pack-priv void innerComplete(ObservableSwitchMapCompletable.SwitchMapCompletableObserver.SwitchMapInnerObserver sender)
innerErrorback to summary
pack-priv void innerError(ObservableSwitchMapCompletable.SwitchMapCompletableObserver.SwitchMapInnerObserver sender, Throwable error)
isDisposedback to summary
public boolean isDisposed()

Implements io.reactivex.rxjava3.disposables.Disposable.isDisposed.

Doc from io.reactivex.rxjava3.disposables.Disposable.isDisposed.

Returns true if this resource has been disposed.

Returns:boolean

true if this resource has been disposed

Annotations
@Override
onCompleteback to summary
public void onComplete()

Implements io.reactivex.rxjava3.core.Observer.onComplete.

Doc from io.reactivex.rxjava3.core.Observer.onComplete.

Notifies the Observer that the Observable has finished sending push-based notifications.

The Observable will not call this method if it calls onError.

Annotations
@Override
onErrorback to summary
public void onError(Throwable t)
Annotations
@Override
onNextback to summary
public void onNext(T t)

Implements io.reactivex.rxjava3.core.Observer.onNext.

Doc from io.reactivex.rxjava3.core.Observer.onNext.

Provides the Observer with a new item to observe.

The Observable may call this method 0 or more times.

The Observable will not call this method again after it calls either onComplete or onError.

Parameters
t:T

the item emitted by the Observable

Annotations
@Override
onSubscribeback to summary
public void onSubscribe(Disposable d)
Annotations
@Override
io.reactivex.rxjava3.internal.operators.mixed back to summary

pack-priv final Class ObservableSwitchMapCompletable.SwitchMapCompletableObserver.SwitchMapInnerObserver

extends AtomicReference<Disposable>
implements CompletableObserver
Class Inheritance
All Implemented Interfaces
io.reactivex.rxjava3.core.CompletableObserver

Field Summary

Modifier and TypeField and Description
pack-priv final ObservableSwitchMapCompletable.SwitchMapCompletableObserver<?>
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Field Detail

parentback to summary
pack-priv final ObservableSwitchMapCompletable.SwitchMapCompletableObserver<?> parent
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.concurrent.atomic.AtomicReference.serialVersionUID.

Constructor Detail

SwitchMapInnerObserverback to summary
pack-priv SwitchMapInnerObserver(ObservableSwitchMapCompletable.SwitchMapCompletableObserver<?> parent)

Method Detail

disposeback to summary
pack-priv void dispose()
onCompleteback to summary
public void onComplete()

Implements io.reactivex.rxjava3.core.CompletableObserver.onComplete.

Doc from io.reactivex.rxjava3.core.CompletableObserver.onComplete.

Called once the deferred computation completes normally.

Annotations
@Override
onErrorback to summary
public void onError(Throwable e)
Annotations
@Override
onSubscribeback to summary
public void onSubscribe(Disposable d)
Annotations
@Override