Class DispatchWorkProcessor<T>

    • Method Detail

      • create

        public static <T> DispatchWorkProcessor<T> create​(Scheduler scheduler)
        Create an empty DispatchWorkProcessor instance with the given scheduler, default capacity hint (Flowable.bufferSize(), expected number of items cached until consumption) and delaying errors.
        Type Parameters:
        T - the input and output value type
        Parameters:
        scheduler - the scheduler to use for the Observers to be notified on
        Returns:
        the new DispatchWorkSubject instance
      • createUnbounded

        public static <T> DispatchWorkProcessor<T> createUnbounded​(Scheduler scheduler)
        Create an empty, unbounded DispatchWorkProcessor instance with the given scheduler, default capacity hint (Flowable.bufferSize(), expected number of items cached until consumption) and delaying errors.
        Type Parameters:
        T - the input and output value type
        Parameters:
        scheduler - the scheduler to use for the Observers to be notified on
        Returns:
        the new DispatchWorkSubject instance
      • create

        public static <T> DispatchWorkProcessor<T> create​(Scheduler scheduler,
                                                          int capacityHint)
        Create an empty DispatchWorkProcessor instance with the given scheduler, capacity hint (expected number of items cached until consumption) and delaying errors.
        Type Parameters:
        T - the input and output value type
        Parameters:
        scheduler - the scheduler to use for the Observers to be notified on
        capacityHint - the expected number of items to be cached until consumption
        Returns:
        the new DispatchWorkSubject instance
      • create

        public static <T> DispatchWorkProcessor<T> create​(Scheduler scheduler,
                                                          boolean delayErrors)
        Create an empty DispatchWorkProcessor instance with the given scheduler, default capacity hint (Flowable.bufferSize(), expected number of items cached until consumption) and if an error should be delayed.
        Type Parameters:
        T - the input and output value type
        Parameters:
        scheduler - the scheduler to use for the Observers to be notified on
        delayErrors - if true, errors are delivered after items have been consumed
        Returns:
        the new DispatchWorkSubject instance
      • create

        public static <T> DispatchWorkProcessor<T> create​(Scheduler scheduler,
                                                          int capacityHint,
                                                          boolean delayErrors)
        Create an empty DispatchWorkProcessor instance with the given scheduler, capacity hint (expected number of items cached until consumption) and if an error should be delayed.
        Type Parameters:
        T - the input and output value type
        Parameters:
        scheduler - the scheduler to use for the Observers to be notified on
        capacityHint - the expected number of items to be cached until consumption
        delayErrors - if true, errors are delivered after items have been consumed
        Returns:
        the new DispatchWorkSubject instance
      • createUnbounded

        public static <T> DispatchWorkProcessor<T> createUnbounded​(Scheduler scheduler,
                                                                   int capacityHint,
                                                                   boolean delayErrors)
        Create an empty and unbounded DispatchWorkProcessor instance with the given scheduler, capacity hint (expected number of items cached until consumption) and if an error should be delayed.
        Type Parameters:
        T - the input and output value type
        Parameters:
        scheduler - the scheduler to use for the Observers to be notified on
        capacityHint - the expected number of items to be cached until consumption
        delayErrors - if true, errors are delivered after items have been consumed
        Returns:
        the new DispatchWorkSubject instance
      • onError

        public void onError​(java.lang.Throwable e)
        Specified by:
        onError in interface Subscriber<T>