This class is populated by FlowController, which will record throttling events. Currently it
only keeps the last flow control event, but it could be expanded to record more information in
the future. The events can be used to dynamically adjust concurrency in the client. For example:
// Increase flow control limits if there was throttling in the past 5 minutes and throttled time// was longer than 1 minute.while(true){FlowControlEventevent=flowControlEventStats.getLastFlowControlEvent();if(event!=null && event.getTimestampMs() > System.currentMillis()-TimeUnit.MINUTES.toMillis(5) && event.getThrottledTimeInMs() > TimeUnit.MINUTES.toMillis(1)){flowController.increaseThresholds(elementSteps,byteSteps);}Thread.sleep(TimeUnit.MINUTE.toMillis(10));}