Class FlowableTakeLast.TakeLastSubscriber<T>
java.lang.Object
java.util.AbstractCollection<T>
java.util.ArrayDeque<T>
io.reactivex.rxjava3.internal.operators.flowable.FlowableTakeLast.TakeLastSubscriber<T>
- All Implemented Interfaces:
FlowableSubscriber<T>
,Serializable
,Cloneable
,Iterable<T>
,Collection<T>
,Deque<T>
,Queue<T>
,SequencedCollection<T>
,org.reactivestreams.Subscriber<T>
,org.reactivestreams.Subscription
- Enclosing class:
FlowableTakeLast<T>
static final class FlowableTakeLast.TakeLastSubscriber<T>
extends ArrayDeque<T>
implements FlowableSubscriber<T>, org.reactivestreams.Subscription
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean
(package private) final int
(package private) boolean
(package private) final org.reactivestreams.Subscriber
<? super T> (package private) final AtomicLong
private static final long
(package private) org.reactivestreams.Subscription
(package private) final AtomicInteger
-
Constructor Summary
ConstructorsConstructorDescriptionTakeLastSubscriber
(org.reactivestreams.Subscriber<? super T> actual, int count) -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
(package private) void
drain()
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) Methods inherited from class java.util.ArrayDeque
add, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, forEach, getFirst, getLast, isEmpty, iterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, removeAll, removeFirst, removeFirstOccurrence, removeIf, removeLast, removeLastOccurrence, retainAll, size, spliterator, toArray, toArray
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
containsAll, equals, hashCode, parallelStream, stream, toArray
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
downstream
-
count
final int count -
upstream
org.reactivestreams.Subscription upstream -
done
volatile boolean done -
cancelled
volatile boolean cancelled -
requested
-
wip
-
-
Constructor Details
-
TakeLastSubscriber
TakeLastSubscriber(org.reactivestreams.Subscriber<? super T> actual, int count)
-
-
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>
-
request
public void request(long n) - Specified by:
request
in interfaceorg.reactivestreams.Subscription
-
cancel
public void cancel()- Specified by:
cancel
in interfaceorg.reactivestreams.Subscription
-
drain
void drain()
-