Class WindowRateControl

java.lang.Object
org.eclipse.jetty.io.WindowRateControl
org.eclipse.jetty.http2.WindowRateControl
All Implemented Interfaces:
RateControl, org.eclipse.jetty.io.RateControl

@Deprecated(since="12.1.11", forRemoval=true) public class WindowRateControl extends org.eclipse.jetty.io.WindowRateControl implements RateControl
Deprecated, for removal: This API element is subject to removal in a future version.
use WindowRateControl instead.

An implementation of RateControl that limits the number of events within a time period.

Events are kept in a queue and for each event the queue is first drained of the old events outside the time window, and then the new event is added to the queue. The size of the queue is maintained separately in an AtomicInteger and if it exceeds the max number of events then WindowRateControl.onEvent(Object) returns false.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Field Summary

    Fields inherited from interface RateControl

    NO_RATE_CONTROL

    Fields inherited from interface org.eclipse.jetty.io.RateControl

    NO_RATE_CONTROL
  • Constructor Summary

    Constructors
    Constructor
    Description
    WindowRateControl(int maxEvents, Duration window)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    fromEventsPerSecond(int maxEvents)
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class org.eclipse.jetty.io.WindowRateControl

    getEventsPerSecond, onEvent

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.eclipse.jetty.io.RateControl

    onEvent
  • Constructor Details

    • WindowRateControl

      public WindowRateControl(int maxEvents, Duration window)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • fromEventsPerSecond

      public static WindowRateControl fromEventsPerSecond(int maxEvents)
      Deprecated, for removal: This API element is subject to removal in a future version.