Class FlowableDistinct.DistinctSubscriber<T,​K>

    • Field Detail

      • collection

        final java.util.Collection<? super K> collection
      • keySelector

        final Function<? super T,​K> keySelector
    • Constructor Detail

      • DistinctSubscriber

        DistinctSubscriber​(org.reactivestreams.Subscriber<? super T> actual,
                           Function<? super T,​K> keySelector,
                           java.util.Collection<? super K> collection)
    • Method Detail

      • onNext

        public void onNext​(T value)
      • onError

        public void onError​(java.lang.Throwable e)
        Specified by:
        onError in interface org.reactivestreams.Subscriber<T>
        Overrides:
        onError in class BasicFuseableSubscriber<T,​T>
      • poll

        @Nullable
        public T poll()
               throws java.lang.Throwable
        Description copied from interface: SimpleQueue
        Tries to dequeue a value (non-null) or returns null if the queue is empty.

        If the producer uses SimpleQueue.offer(Object, Object) and when polling in pairs, if the first poll() returns a non-null item, the second poll() is guaranteed to return a non-null item as well.

        Returns:
        the item or null to indicate an empty queue
        Throws:
        java.lang.Throwable - if some pre-processing of the dequeued item (usually through fused functions) throws.