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));}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis webpage provides documentation for the \u003ccode\u003eFlowControlEventStats\u003c/code\u003e class in the Google API Client Library for Java, specifically within the \u003ccode\u003ecom.google.api.gax.batching\u003c/code\u003e package.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the documentation is for version 2.63.1, and the page lists documentation links for various previous versions, down to version 2.7.1.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eFlowControlEventStats\u003c/code\u003e is a class used to record and manage statistics related to flow control events, particularly throttling occurrences, which is useful for dynamically adjusting concurrency.\u003c/p\u003e\n"],["\u003cp\u003eThe class extends \u003ccode\u003ejava.lang.Object\u003c/code\u003e and inherits its members, with the primary method being \u003ccode\u003egetLastFlowControlEvent()\u003c/code\u003e, which allows retrieving the most recent flow control event.\u003c/p\u003e\n"],["\u003cp\u003eThere is a constructor, \u003ccode\u003eFlowControlEventStats()\u003c/code\u003e, to create a new instance of the \u003ccode\u003eFlowControlEventStats\u003c/code\u003e object.\u003c/p\u003e\n"]]],[],null,[]]