Class FlowableBufferTimed.BufferExactBoundedSubscriber<T,U extends Collection<? super T>>
java.lang.Object
io.reactivex.rxjava3.internal.subscribers.QueueDrainSubscriberPad0
io.reactivex.rxjava3.internal.subscribers.QueueDrainSubscriberWip
io.reactivex.rxjava3.internal.subscribers.QueueDrainSubscriberPad2
io.reactivex.rxjava3.internal.subscribers.QueueDrainSubscriberPad3
io.reactivex.rxjava3.internal.subscribers.QueueDrainSubscriberPad4
io.reactivex.rxjava3.internal.subscribers.QueueDrainSubscriber<T,U,U>
io.reactivex.rxjava3.internal.operators.flowable.FlowableBufferTimed.BufferExactBoundedSubscriber<T,U>
- All Implemented Interfaces:
FlowableSubscriber<T>
,Disposable
,QueueDrain<U,
,U> Runnable
,org.reactivestreams.Subscriber<T>
,org.reactivestreams.Subscription
- Enclosing class:
FlowableBufferTimed<T,
U extends Collection<? super T>>
static final class FlowableBufferTimed.BufferExactBoundedSubscriber<T,U extends Collection<? super T>>
extends QueueDrainSubscriber<T,U,U>
implements org.reactivestreams.Subscription, Runnable, Disposable
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) U
(package private) long
(package private) final int
(package private) long
(package private) final boolean
(package private) Disposable
(package private) final long
(package private) final TimeUnit
(package private) org.reactivestreams.Subscription
(package private) final Scheduler.Worker
Fields inherited from class io.reactivex.rxjava3.internal.subscribers.QueueDrainSubscriber
cancelled, done, downstream, error, queue
-
Constructor Summary
ConstructorsConstructorDescriptionBufferExactBoundedSubscriber
(org.reactivestreams.Subscriber<? super U> actual, Supplier<U> bufferSupplier, long timespan, TimeUnit unit, int maxSize, boolean restartOnMaxSize, Scheduler.Worker w) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Accept the value and return true if forwarded.void
cancel()
void
dispose()
Dispose the resource, the operation should be idempotent.boolean
Returns true if this resource has been disposed.void
void
void
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)
.void
request
(long n) void
run()
Methods inherited from class io.reactivex.rxjava3.internal.subscribers.QueueDrainSubscriber
cancelled, done, enter, error, fastEnter, fastPathEmitMax, fastPathOrderedEmitMax, leave, produced, requested, requested
-
Field Details
-
bufferSupplier
-
timespan
final long timespan -
unit
-
maxSize
final int maxSize -
restartTimerOnMaxSize
final boolean restartTimerOnMaxSize -
w
-
buffer
U extends Collection<? super T> buffer -
timer
Disposable timer -
upstream
org.reactivestreams.Subscription upstream -
producerIndex
long producerIndex -
consumerIndex
long consumerIndex
-
-
Constructor Details
-
BufferExactBoundedSubscriber
BufferExactBoundedSubscriber(org.reactivestreams.Subscriber<? super U> actual, Supplier<U> bufferSupplier, long timespan, TimeUnit unit, int maxSize, boolean restartOnMaxSize, Scheduler.Worker w)
-
-
Method Details
-
onSubscribe
public 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>
-
onNext
- Specified by:
onNext
in interfaceorg.reactivestreams.Subscriber<T>
-
onError
- Specified by:
onError
in interfaceorg.reactivestreams.Subscriber<T>
-
onComplete
public void onComplete()- Specified by:
onComplete
in interfaceorg.reactivestreams.Subscriber<T>
-
accept
Description copied from interface:QueueDrain
Accept the value and return true if forwarded.- Specified by:
accept
in interfaceQueueDrain<T,
U extends Collection<? super T>> - Overrides:
accept
in classQueueDrainSubscriber<T,
U extends Collection<? super T>, U extends Collection<? super T>> - Parameters:
a
- the subscriberv
- the value- Returns:
- true if the value was delivered
-
request
public void request(long n) - Specified by:
request
in interfaceorg.reactivestreams.Subscription
-
cancel
public void cancel()- Specified by:
cancel
in interfaceorg.reactivestreams.Subscription
-
dispose
public void dispose()Description copied from interface:Disposable
Dispose the resource, the operation should be idempotent.- Specified by:
dispose
in interfaceDisposable
-
isDisposed
public boolean isDisposed()Description copied from interface:Disposable
Returns true if this resource has been disposed.- Specified by:
isDisposed
in interfaceDisposable
- Returns:
- true if this resource has been disposed
-
run
public void run()
-