public static final class OperatorGroupBy.GroupBySubscriber<T,K,V> extends Subscriber<T>
Constructor and Description |
---|
GroupBySubscriber(Subscriber<? super GroupedObservable<K,V>> actual,
Func1<? super T,? extends K> keySelector,
Func1<? super T,? extends V> valueSelector,
int bufferSize,
boolean delayError,
Func1<Action1<K>,Map<K,Object>> mapFactory) |
Modifier and Type | Method and Description |
---|---|
void |
cancel() |
void |
cancel(K key) |
void |
onCompleted()
Notifies the Observer that the
Observable has finished sending push-based notifications. |
void |
onError(Throwable t)
Notifies the Observer that the
Observable has experienced an error condition. |
void |
onNext(T t)
Provides the Observer with a new item to observe.
|
void |
requestMore(long n) |
void |
setProducer(Producer s)
If other subscriber is set (by calling constructor
Subscriber.Subscriber(Subscriber) or
Subscriber.Subscriber(Subscriber, boolean) ) then this method calls
setProducer on the other subscriber. |
add, isUnsubscribed, onStart, request, unsubscribe
public void setProducer(Producer s)
Subscriber
Subscriber.Subscriber(Subscriber)
or
Subscriber.Subscriber(Subscriber, boolean)
) then this method calls
setProducer
on the other subscriber. If the other subscriber
is not set and no requests have been made to this subscriber then
p.request(Long.MAX_VALUE)
is called. If the other subscriber
is not set and some requests have been made to this subscriber then
p.request(n)
is called where n is the accumulated requests
to this subscriber.setProducer
in class Subscriber<T>
s
- producer to be used by this subscriber or the other subscriber
(or recursively its other subscriber) to make requests frompublic void onNext(T t)
Observer
The Observable
may call this method 0 or more times.
The Observable
will not call this method again after it calls either Observer.onCompleted()
or
Observer.onError(java.lang.Throwable)
.
t
- the item emitted by the Observablepublic void onError(Throwable t)
Observer
Observable
has experienced an error condition.
If the Observable
calls this method, it will not thereafter call Observer.onNext(T)
or
Observer.onCompleted()
.
t
- the exception encountered by the Observablepublic void onCompleted()
Observer
Observable
has finished sending push-based notifications.
The Observable
will not call this method if it calls Observer.onError(java.lang.Throwable)
.
public void requestMore(long n)
public void cancel()
public void cancel(K key)
Copyright © 2018. All rights reserved.