Package rx.internal.operators
Class OnSubscribeFromAsync.BufferAsyncEmitter<T>
- java.lang.Object
-
- java.lang.Number
-
- java.util.concurrent.atomic.AtomicLong
-
- rx.internal.operators.OnSubscribeFromAsync.BaseAsyncEmitter<T>
-
- rx.internal.operators.OnSubscribeFromAsync.BufferAsyncEmitter<T>
-
- All Implemented Interfaces:
java.io.Serializable
,AsyncEmitter<T>
,Observer<T>
,Producer
,Subscription
- Enclosing class:
- OnSubscribeFromAsync<T>
static final class OnSubscribeFromAsync.BufferAsyncEmitter<T> extends OnSubscribeFromAsync.BaseAsyncEmitter<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface rx.AsyncEmitter
AsyncEmitter.BackpressureMode, AsyncEmitter.Cancellable
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
done
(package private) java.lang.Throwable
error
(package private) NotificationLite<T>
nl
(package private) java.util.Queue<java.lang.Object>
queue
private static long
serialVersionUID
(package private) java.util.concurrent.atomic.AtomicInteger
wip
-
Fields inherited from class rx.internal.operators.OnSubscribeFromAsync.BaseAsyncEmitter
actual, serial
-
-
Constructor Summary
Constructors Constructor Description BufferAsyncEmitter(Subscriber<? super T> actual, int capacityHint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
drain()
void
onCompleted()
Notifies the Observer that theObservable
has finished sending push-based notifications.void
onError(java.lang.Throwable e)
Notifies the Observer that theObservable
has experienced an error condition.void
onNext(T t)
Provides the Observer with a new item to observe.(package private) void
onRequested()
(package private) void
onUnsubscribed()
-
Methods inherited from class rx.internal.operators.OnSubscribeFromAsync.BaseAsyncEmitter
isUnsubscribed, request, requested, setCancellation, setSubscription, unsubscribe
-
Methods inherited from class java.util.concurrent.atomic.AtomicLong
accumulateAndGet, addAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, decrementAndGet, doubleValue, floatValue, get, getAcquire, getAndAccumulate, getAndAdd, getAndDecrement, getAndIncrement, getAndSet, getAndUpdate, getOpaque, getPlain, incrementAndGet, intValue, lazySet, longValue, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
queue
final java.util.Queue<java.lang.Object> queue
-
error
java.lang.Throwable error
-
done
volatile boolean done
-
wip
final java.util.concurrent.atomic.AtomicInteger wip
-
nl
final NotificationLite<T> nl
-
-
Constructor Detail
-
BufferAsyncEmitter
public BufferAsyncEmitter(Subscriber<? super T> actual, int capacityHint)
-
-
Method Detail
-
onNext
public void onNext(T t)
Description copied from interface:Observer
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 eitherObserver.onCompleted()
orObserver.onError(java.lang.Throwable)
.- Parameters:
t
- the item emitted by the Observable
-
onError
public void onError(java.lang.Throwable e)
Description copied from interface:Observer
Notifies the Observer that theObservable
has experienced an error condition.If the
Observable
calls this method, it will not thereafter callObserver.onNext(T)
orObserver.onCompleted()
.
-
onCompleted
public void onCompleted()
Description copied from interface:Observer
Notifies the Observer that theObservable
has finished sending push-based notifications.The
Observable
will not call this method if it callsObserver.onError(java.lang.Throwable)
.- Specified by:
onCompleted
in interfaceObserver<T>
- Overrides:
onCompleted
in classOnSubscribeFromAsync.BaseAsyncEmitter<T>
-
onRequested
void onRequested()
- Overrides:
onRequested
in classOnSubscribeFromAsync.BaseAsyncEmitter<T>
-
onUnsubscribed
void onUnsubscribed()
- Overrides:
onUnsubscribed
in classOnSubscribeFromAsync.BaseAsyncEmitter<T>
-
drain
void drain()
-
-