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 AtomicLongprivate 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 TypeMethodDescriptionvoidcancel()(package private) voiddrain()voidvoidvoidvoidonSubscribe(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).voidrequest(long n) Methods inherited from class 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, toArrayMethods inherited from class AbstractCollection
containsAll, toStringMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface 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:FlowableSubscriberImplementors 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:
onSubscribein interfaceFlowableSubscriber<T>- Specified by:
onSubscribein interfaceorg.reactivestreams.Subscriber<T>
-
onNext
-
onError
-
onComplete
public void onComplete()- Specified by:
onCompletein interfaceorg.reactivestreams.Subscriber<T>
-
request
public void request(long n) - Specified by:
requestin interfaceorg.reactivestreams.Subscription
-
cancel
public void cancel()- Specified by:
cancelin interfaceorg.reactivestreams.Subscription
-
drain
void drain()
-