Interface BackpressureDrainManager.BackpressureQueueCallback

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean accept​(java.lang.Object value)
      Override this method to deliver an element to downstream.
      void complete​(java.lang.Throwable exception)
      Override this method to deliver a normal or exceptional terminal event.
      java.lang.Object peek()
      Override this method to peek for the next element, null meaning no next element available now.
      java.lang.Object poll()
      Override this method to poll (consume) the next element, null meaning no next element available now.
    • Method Detail

      • peek

        java.lang.Object peek()
        Override this method to peek for the next element, null meaning no next element available now.

        It will be called plain and while holding this object's monitor.

        Returns:
        the next element or null if no next element available
      • poll

        java.lang.Object poll()
        Override this method to poll (consume) the next element, null meaning no next element available now.
        Returns:
        the next element or null if no next element available
      • accept

        boolean accept​(java.lang.Object value)
        Override this method to deliver an element to downstream. The logic ensures that this happens only in the right conditions.
        Parameters:
        value - the value to deliver, not null
        Returns:
        true indicates that one should terminate the emission loop unconditionally and not deliver any further elements or terminal events.
      • complete

        void complete​(java.lang.Throwable exception)
        Override this method to deliver a normal or exceptional terminal event.
        Parameters:
        exception - if not null, contains the terminal exception