Class AsyncBufferingSubscriber<T>

  • Type Parameters:
    T - Type of data requested
    All Implemented Interfaces:
    org.reactivestreams.Subscriber<T>

    public class AsyncBufferingSubscriber<T>
    extends Object
    implements org.reactivestreams.Subscriber<T>
    An implementation of Subscriber that execute the provided function for every event and limits the number of concurrent function execution to the given maxConcurrentRequests
    • Method Detail

      • onSubscribe

        public void onSubscribe​(org.reactivestreams.Subscription subscription)
        Specified by:
        onSubscribe in interface org.reactivestreams.Subscriber<T>
      • onNext

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

        public void onError​(Throwable t)
        Specified by:
        onError in interface org.reactivestreams.Subscriber<T>
      • onComplete

        public void onComplete()
        Specified by:
        onComplete in interface org.reactivestreams.Subscriber<T>
      • numRequestsInFlight

        public int numRequestsInFlight()
        Returns:
        the number of requests that are currently in flight