Class FlowableFilter.FilterSubscriber<T>

    • Constructor Detail

      • FilterSubscriber

        FilterSubscriber​(org.reactivestreams.Subscriber<? super T> actual,
                         Predicate<? super T> filter)
    • Method Detail

      • onNext

        public void onNext​(T t)
        Specified by:
        onNext in interface org.reactivestreams.Subscriber<T>
      • tryOnNext

        public boolean tryOnNext​(T t)
        Description copied from interface: ConditionalSubscriber
        Conditionally takes the value.
        Specified by:
        tryOnNext in interface ConditionalSubscriber<T>
        Parameters:
        t - the value to deliver
        Returns:
        true if the value has been accepted, false if the value has been rejected and the next value can be sent immediately
      • 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.

        Specified by:
        poll in interface SimpleQueue<T>
        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.