Top Description Inners Fields Constructors Methods
rx.internal.operators

public final Class OnSubscribeFlatMapCompletable<T>

extends Object
implements Observable.OnSubscribe<T>
Class Inheritance
All Implemented Interfaces
rx.Observable.OnSubscribe, rx.functions.Action1, rx.functions.Action, rx.functions.Function
Type Parameters
<T>
the upstream value type
Imports
java.util.concurrent.atomic.*, rx.*, rx.exceptions.Exceptions, rx.functions.Func1, rx.internal.util.ExceptionsUtils, rx.plugins.RxJavaHooks, rx.subscriptions.CompositeSubscription

Maps upstream values to Completables and merges them, up to a given number of them concurrently, optionally delaying errors.

History: 1.2.7 - experimental

Since
1.3

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 Func1<? super T, ? extends Completable>
pack-priv final int
pack-priv final Observable<T>

Constructor Summary

AccessConstructor and Description
public
OnSubscribeFlatMapCompletable(Observable<T> source, Func1<? super T, ? extends Completable> mapper, boolean delayErrors, int maxConcurrency)

Method Summary

Modifier and TypeMethod and Description
public void
call(Subscriber<? super T> child)

Implements rx.functions.Action1.call.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delayErrorsback to summary
pack-priv final boolean delayErrors
mapperback to summary
pack-priv final Func1<? super T, ? extends Completable> mapper
maxConcurrencyback to summary
pack-priv final int maxConcurrency
sourceback to summary
pack-priv final Observable<T> source

Constructor Detail

OnSubscribeFlatMapCompletableback to summary
public OnSubscribeFlatMapCompletable(Observable<T> source, Func1<? super T, ? extends Completable> mapper, boolean delayErrors, int maxConcurrency)

Method Detail

callback to summary
public void call(Subscriber<? super T> child)

Implements rx.functions.Action1.call.

Annotations
@Override
rx.internal.operators back to summary

pack-priv final Class OnSubscribeFlatMapCompletable.FlatMapCompletableSubscriber<T>

extends Subscriber<T>
Class Inheritance

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
pack-priv final Subscriber<? super T>
pack-priv final boolean
pack-priv final AtomicReference<Throwable>
pack-priv final Func1<? super T, ? extends Completable>
pack-priv final int
pack-priv final CompositeSubscription
pack-priv final AtomicInteger

Constructor Summary

AccessConstructor and Description
pack-priv
FlatMapCompletableSubscriber(Subscriber<? super T> actual, Func1<? super T, ? extends Completable> mapper, boolean delayErrors, int maxConcurrency)

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
done()

public void
public void
public void
onCompleted()

Implements rx.Observer.onCompleted.

Notifies the Observer that the Observable has finished sending push-based notifications.
public void
onError(Throwable
the exception encountered by the Observable
e
)

Implements rx.Observer.onError.

Notifies the Observer that the Observable has experienced an error condition.
public void
onNext(T
the item emitted by the Observable
t
)

Implements rx.Observer.onNext.

Provides the Observer with a new item to observe.
Inherited from rx.Subscriber:
addisUnsubscribedonStartrequestsetProducerunsubscribe

Field Detail

actualback to summary
pack-priv final Subscriber<? super T> actual
delayErrorsback to summary
pack-priv final boolean delayErrors
errorsback to summary
pack-priv final AtomicReference<Throwable> errors
mapperback to summary
pack-priv final Func1<? super T, ? extends Completable> mapper
maxConcurrencyback to summary
pack-priv final int maxConcurrency
setback to summary
pack-priv final CompositeSubscription set
wipback to summary
pack-priv final AtomicInteger wip

Constructor Detail

FlatMapCompletableSubscriberback to summary
pack-priv FlatMapCompletableSubscriber(Subscriber<? super T> actual, Func1<? super T, ? extends Completable> mapper, boolean delayErrors, int maxConcurrency)

Method Detail

doneback to summary
pack-priv boolean done()
innerCompleteback to summary
public void innerComplete(OnSubscribeFlatMapCompletable.FlatMapCompletableSubscriber<T>.InnerSubscriber inner)
innerErrorback to summary
public void innerError(OnSubscribeFlatMapCompletable.FlatMapCompletableSubscriber<T>.InnerSubscriber inner, Throwable e)
onCompletedback to summary
public void onCompleted()

Implements rx.Observer.onCompleted.

Doc from rx.Observer.onCompleted.

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 e)

Implements rx.Observer.onError.

Doc from rx.Observer.onError.

Notifies the Observer that the Observable has experienced an error condition.

If the Observable calls this method, it will not thereafter call onNext or onCompleted.

Parameters
e:Throwable

the exception encountered by the Observable

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

Implements rx.Observer.onNext.

Doc from rx.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 onCompleted or onError.

Parameters
t:T

the item emitted by the Observable

Annotations
@Override
rx.internal.operators back to summary

pack-priv final Class OnSubscribeFlatMapCompletable.FlatMapCompletableSubscriber.InnerSubscriber

extends AtomicReference<Subscription>
implements CompletableSubscriber, Subscription
Class Inheritance
All Implemented Interfaces
rx.Subscription, rx.CompletableSubscriber

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
isUnsubscribed()

Implements rx.Subscription.isUnsubscribed.

Indicates whether this Subscription is currently unsubscribed.
public void
onCompleted()

Implements rx.CompletableSubscriber.onCompleted.

Called once the deferred computation completes normally.
public void
onError(Throwable
the exception, not null.
e
)

Implements rx.CompletableSubscriber.onError.

Called once if the deferred computation 'throws' an exception.
public void
onSubscribe(Subscription
the Subscription instance to call dispose on for cancellation, not null
d
)

Implements rx.CompletableSubscriber.onSubscribe.

Called once by the Completable to set a Subscription on this instance which then can be used to cancel the subscription at any time.
public void
unsubscribe()

Implements rx.Subscription.unsubscribe.

Stops the receipt of notifications on the Subscriber that was registered when this Subscription was received.
Inherited from java.util.concurrent.atomic.AtomicReference:
accumulateAndGetcompareAndExchangecompareAndExchangeAcquirecompareAndExchangeReleasecompareAndSetgetgetAcquiregetAndAccumulategetAndSetgetAndUpdategetOpaquegetPlainlazySetsetsetOpaquesetPlainsetReleasetoStringupdateAndGetweakCompareAndSetweakCompareAndSetAcquireweakCompareAndSetPlainweakCompareAndSetReleaseweakCompareAndSetVolatile

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

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

Constructor Detail

InnerSubscriberback to summary
pack-priv InnerSubscriber()

Method Detail

isUnsubscribedback to summary
public boolean isUnsubscribed()

Implements rx.Subscription.isUnsubscribed.

Doc from rx.Subscription.isUnsubscribed.

Indicates whether this Subscription is currently unsubscribed.

Returns:boolean

true if this Subscription is currently unsubscribed, false otherwise

Annotations
@Override
onCompletedback to summary
public void onCompleted()

Implements rx.CompletableSubscriber.onCompleted.

Doc from rx.CompletableSubscriber.onCompleted.

Called once the deferred computation completes normally.

Annotations
@Override
onErrorback to summary
public void onError(Throwable e)

Implements rx.CompletableSubscriber.onError.

Doc from rx.CompletableSubscriber.onError.

Called once if the deferred computation 'throws' an exception.

Parameters
e:Throwable

the exception, not null.

Annotations
@Override
onSubscribeback to summary
public void onSubscribe(Subscription d)

Implements rx.CompletableSubscriber.onSubscribe.

Doc from rx.CompletableSubscriber.onSubscribe.

Called once by the Completable to set a Subscription on this instance which then can be used to cancel the subscription at any time.

Parameters
d:Subscription

the Subscription instance to call dispose on for cancellation, not null

Annotations
@Override
unsubscribeback to summary
public void unsubscribe()

Implements rx.Subscription.unsubscribe.

Doc from rx.Subscription.unsubscribe.

Stops the receipt of notifications on the Subscriber that was registered when this Subscription was received.

This allows deregistering an Subscriber before it has finished receiving all events (i.e. before onCompleted is called).

Annotations
@Override