Interface PushbackPolicy<T,​U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>

  • Type Parameters:
    T - The type of the data
    U - The type of the queue
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @ConsumerType
    @FunctionalInterface
    public interface PushbackPolicy<T,​U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
    A PushbackPolicy is used to calculate how much back pressure to apply based on the current buffer. The PushbackPolicy will be called after an event has been queued, and the returned value will be used as back pressure.
    See Also:
    PushbackPolicyOption
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long pushback​(U queue)
      Given the current state of the queue, determine the level of back pressure that should be applied
    • Method Detail

      • pushback

        long pushback​(U queue)
               throws java.lang.Exception
        Given the current state of the queue, determine the level of back pressure that should be applied
        Parameters:
        queue -
        Returns:
        a back pressure value in nanoseconds
        Throws:
        java.lang.Exception