Package 

Interface StreamThrottlePolicy


  • 
    public interface StreamThrottlePolicy
    
                        

    Throttle strategy that controls when values are delivered within a time window.

    Leading — First value in the window is delivered immediately. Subsequent values are dropped until the window expires.

    submit: A---B-C-D-----------E-F---
    output: A--------------------E-----
             |--- windowMs ---|   |--- windowMs ---|

    Trailing — Values are collected during the window. Only the last value is delivered when the window expires.

    submit: A---B-C-D-----------E-F---
    output: -----------D--------------F
             |--- windowMs ---|   |--- windowMs ---|

    LeadingAndTrailing — First value delivered immediately. The last value in the window is also delivered when the window expires (if different from the leading value).

    submit: A---B-C-D-----------E-F---
    output: A----------D--------E----F
             |--- windowMs ---|   |--- windowMs ---|
    • Method Summary

      Modifier and Type Method Description
      abstract Long getWindowMs() Minimum time in milliseconds between accepted values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getWindowMs

         abstract Long getWindowMs()

        Minimum time in milliseconds between accepted values.