Class FlowableWindowTimed.AbstractWindowSubscriber<T>
java.lang.Object
java.lang.Number
java.util.concurrent.atomic.AtomicInteger
io.reactivex.rxjava3.internal.operators.flowable.FlowableWindowTimed.AbstractWindowSubscriber<T>
- All Implemented Interfaces:
FlowableSubscriber<T>
,Serializable
,org.reactivestreams.Subscriber<T>
,org.reactivestreams.Subscription
- Direct Known Subclasses:
FlowableWindowTimed.WindowExactBoundedSubscriber
,FlowableWindowTimed.WindowExactUnboundedSubscriber
,FlowableWindowTimed.WindowSkipSubscriber
- Enclosing class:
FlowableWindowTimed<T>
abstract static class FlowableWindowTimed.AbstractWindowSubscriber<T>
extends AtomicInteger
implements FlowableSubscriber<T>, org.reactivestreams.Subscription
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final int
(package private) boolean
(package private) final AtomicBoolean
(package private) long
(package private) Throwable
(package private) final SimplePlainQueue
<Object> (package private) final AtomicLong
private static final long
(package private) final long
(package private) final TimeUnit
(package private) org.reactivestreams.Subscription
(package private) boolean
(package private) final AtomicInteger
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractWindowSubscriber
(org.reactivestreams.Subscriber<? super Flowable<T>> downstream, long timespan, TimeUnit unit, int bufferSize) -
Method Summary
Modifier and TypeMethodDescriptionfinal void
cancel()
(package private) abstract void
(package private) abstract void
(package private) abstract void
drain()
final void
final void
final void
final void
onSubscribe
(org.reactivestreams.Subscription s) Implementors of this method should make sure everything that needs to be visible inSubscriber.onNext(Object)
is established before callingSubscription.request(long)
.final void
request
(long n) (package private) final void
Methods inherited from class java.util.concurrent.atomic.AtomicInteger
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
Methods inherited from class java.lang.Number
byteValue, shortValue
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
downstream
-
queue
-
timespan
final long timespan -
unit
-
bufferSize
final int bufferSize -
requested
-
emitted
long emitted -
done
volatile boolean done -
error
Throwable error -
upstream
org.reactivestreams.Subscription upstream -
downstreamCancelled
-
upstreamCancelled
volatile boolean upstreamCancelled -
windowCount
-
-
Constructor Details
-
AbstractWindowSubscriber
-
-
Method Details
-
onSubscribe
public final void onSubscribe(org.reactivestreams.Subscription s) Description copied from interface:FlowableSubscriber
Implementors of this method should make sure everything that needs to be visible inSubscriber.onNext(Object)
is established before callingSubscription.request(long)
. In practice this means no initialization should happen after therequest()
call and additional behavior is thread safe in respect toonNext
.- Specified by:
onSubscribe
in interfaceFlowableSubscriber<T>
- Specified by:
onSubscribe
in interfaceorg.reactivestreams.Subscriber<T>
-
createFirstWindow
abstract void createFirstWindow() -
onNext
- Specified by:
onNext
in interfaceorg.reactivestreams.Subscriber<T>
-
onError
- Specified by:
onError
in interfaceorg.reactivestreams.Subscriber<T>
-
onComplete
public final void onComplete()- Specified by:
onComplete
in interfaceorg.reactivestreams.Subscriber<T>
-
request
public final void request(long n) - Specified by:
request
in interfaceorg.reactivestreams.Subscription
-
cancel
public final void cancel()- Specified by:
cancel
in interfaceorg.reactivestreams.Subscription
-
windowDone
final void windowDone() -
cleanupResources
abstract void cleanupResources() -
drain
abstract void drain()
-