Top Inners Fields Constructors Methods
rx.internal.operators

public final Class OnSubscribeCombineLatest<T, R>

extends Object
implements Observable.OnSubscribe<R>
Class Inheritance
All Implemented Interfaces
rx.Observable.OnSubscribe, rx.functions.Action1, rx.functions.Action, rx.functions.Function
Imports
java.util.*, java.util.concurrent.atomic.*, rx.*, .Observable, .Observable.OnSubscribe, rx.exceptions.CompositeException, rx.functions.FuncN, rx.internal.util.RxRingBuffer, rx.internal.util.atomic.SpscLinkedArrayQueue, rx.plugins.RxJavaHooks

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final int
pack-priv final FuncN<? extends R>
pack-priv final boolean
pack-priv final Observable<? extends T>[]
pack-priv final Iterable<? extends Observable<? extends T>>

Constructor Summary

AccessConstructor and Description
public
OnSubscribeCombineLatest(Iterable<? extends Observable<? extends T>> sourcesIterable, FuncN<? extends R> combiner)

public
OnSubscribeCombineLatest(Observable<? extends T>[] sources, Iterable<? extends Observable<? extends T>> sourcesIterable, FuncN<? extends R> combiner, int bufferSize, boolean delayError)

Method Summary

Modifier and TypeMethod and Description
public void
call(Subscriber<? super R> s)

Implements rx.functions.Action1.call.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferSizeback to summary
pack-priv final int bufferSize
combinerback to summary
pack-priv final FuncN<? extends R> combiner
delayErrorback to summary
pack-priv final boolean delayError
sourcesback to summary
pack-priv final Observable<? extends T>[] sources
sourcesIterableback to summary
pack-priv final Iterable<? extends Observable<? extends T>> sourcesIterable

Constructor Detail

OnSubscribeCombineLatestback to summary
public OnSubscribeCombineLatest(Iterable<? extends Observable<? extends T>> sourcesIterable, FuncN<? extends R> combiner)
OnSubscribeCombineLatestback to summary
public OnSubscribeCombineLatest(Observable<? extends T>[] sources, Iterable<? extends Observable<? extends T>> sourcesIterable, FuncN<? extends R> combiner, int bufferSize, boolean delayError)

Method Detail

callback to summary
public void call(Subscriber<? super R> s)

Implements rx.functions.Action1.call.

Annotations
@Override
@SuppressWarnings:unchecked, rawtypes
rx.internal.operators back to summary

pack-priv final Class OnSubscribeCombineLatest.CombinerSubscriber<T, R>

extends Subscriber<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv boolean
pack-priv final int
pack-priv final OnSubscribeCombineLatest.LatestCoordinator<T, R>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
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
t
)

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.
public void
requestMore(long n)

Inherited from rx.Subscriber:
addisUnsubscribedonStartrequestsetProducerunsubscribe

Field Detail

doneback to summary
pack-priv boolean done
indexback to summary
pack-priv final int index
parentback to summary
pack-priv final OnSubscribeCombineLatest.LatestCoordinator<T, R> parent

Constructor Detail

CombinerSubscriberback to summary
public CombinerSubscriber(OnSubscribeCombineLatest.LatestCoordinator<T, R> parent, int index)

Method Detail

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

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
t: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
requestMoreback to summary
public void requestMore(long n)
rx.internal.operators back to summary

pack-priv final Class OnSubscribeCombineLatest.LatestCoordinator<T, R>

extends AtomicInteger
implements Producer, Subscription
Class Inheritance
All Implemented Interfaces
rx.Subscription, rx.Producer

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv final Subscriber<? super R>
pack-priv final int
pack-priv volatile boolean
pack-priv final FuncN<? extends R>
pack-priv int
pack-priv final boolean
pack-priv volatile boolean
pack-priv final AtomicReference<Throwable>
pack-priv final Object[]
pack-priv static final Object
MISSING

Indicates the particular source hasn't emitted any value yet.

pack-priv final SpscLinkedArrayQueue<Object>
pack-priv final AtomicLong
private static final long
pack-priv final OnSubscribeCombineLatest.CombinerSubscriber<T, R>[]

Constructor Summary

AccessConstructor and Description
public
LatestCoordinator(Subscriber<? super R> actual, FuncN<? extends R> combiner, int count, int bufferSize, boolean delayError)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
cancel(Queue<?> q)

pack-priv boolean
checkTerminated(boolean mainDone, boolean queueEmpty, Subscriber<?> childSubscriber, Queue<?> q, boolean delayError)

pack-priv void
combine(Object
the notification to combine, null indicates the source terminated normally
value
,
int
the index of the source subscriber
index
)

Combine the given notification value from the indexth source with the existing known latest values.

pack-priv void
public boolean
isUnsubscribed()

Implements rx.Subscription.isUnsubscribed.

Indicates whether this Subscription is currently unsubscribed.
pack-priv void
public void
request(long
the maximum number of items you want this Producer to produce, or Long.MAX_VALUE if you want the Producer to produce items at its own pace
n
)

Implements rx.Producer.request.

Request a certain maximum number of items from this Producer.
public void
subscribe(Observable<? extends T>[] sources)

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.AtomicInteger:
accumulateAndGetaddAndGetcompareAndExchangecompareAndExchangeAcquirecompareAndExchangeReleasecompareAndSetdecrementAndGetdoubleValuefloatValuegetgetAcquiregetAndAccumulategetAndAddgetAndDecrementgetAndIncrementgetAndSetgetAndUpdategetOpaquegetPlainincrementAndGetintValuelazySetlongValuesetsetOpaquesetPlainsetReleasetoStringupdateAndGetweakCompareAndSetweakCompareAndSetAcquireweakCompareAndSetPlainweakCompareAndSetReleaseweakCompareAndSetVolatile

Field Detail

activeback to summary
pack-priv int active
actualback to summary
pack-priv final Subscriber<? super R> actual
bufferSizeback to summary
pack-priv final int bufferSize
cancelledback to summary
pack-priv volatile boolean cancelled
combinerback to summary
pack-priv final FuncN<? extends R> combiner
completeback to summary
pack-priv int complete
delayErrorback to summary
pack-priv final boolean delayError
doneback to summary
pack-priv volatile boolean done
errorback to summary
pack-priv final AtomicReference<Throwable> error
latestback to summary
pack-priv final Object[] latest
MISSINGback to summary
pack-priv static final Object MISSING

Indicates the particular source hasn't emitted any value yet.

queueback to summary
pack-priv final SpscLinkedArrayQueue<Object> queue
requestedback to summary
pack-priv final AtomicLong requested
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.concurrent.atomic.AtomicInteger.serialVersionUID.

subscribersback to summary
pack-priv final OnSubscribeCombineLatest.CombinerSubscriber<T, R>[] subscribers

Constructor Detail

LatestCoordinatorback to summary
public LatestCoordinator(Subscriber<? super R> actual, FuncN<? extends R> combiner, int count, int bufferSize, boolean delayError)
Annotations
@SuppressWarnings:unchecked

Method Detail

cancelback to summary
pack-priv void cancel(Queue<?> q)
checkTerminatedback to summary
pack-priv boolean checkTerminated(boolean mainDone, boolean queueEmpty, Subscriber<?> childSubscriber, Queue<?> q, boolean delayError)
combineback to summary
pack-priv void combine(Object value, int index)

Combine the given notification value from the indexth source with the existing known latest values.

Parameters
value:Object

the notification to combine, null indicates the source terminated normally

index:int

the index of the source subscriber

drainback to summary
pack-priv void drain()
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
onErrorback to summary
pack-priv void onError(Throwable e)
requestback to summary
public void request(long n)

Implements rx.Producer.request.

Doc from rx.Producer.request.

Request a certain maximum number of items from this Producer. This is a way of requesting backpressure. To disable backpressure, pass Long.MAX_VALUE to this method.

Requests are additive but if a sequence of requests totals more than Long.MAX_VALUE then Long.MAX_VALUE requests will be actioned and the extras may be ignored. Arriving at Long.MAX_VALUE by addition of requests cannot be assumed to disable backpressure. For example, the code below may result in Long.MAX_VALUE requests being actioned only.

request(100);
request(Long.MAX_VALUE-1);
Parameters
n:long

the maximum number of items you want this Producer to produce, or Long.MAX_VALUE if you want the Producer to produce items at its own pace

Annotations
@Override
subscribeback to summary
public void subscribe(Observable<? extends T>[] sources)
Annotations
@SuppressWarnings:unchecked
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