Class WindowRateControl

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

public class WindowRateControl extends Object implements RateControl

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 onEvent(Object) returns false.