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-04-09 UTC."],[[["This page provides documentation for the `FlowControlEventStats` class in the Google API Client Libraries for Java, specifically within the `com.google.api.gax.batching` package, detailing the class across multiple versions."],["The `FlowControlEventStats` class records statistics of flow control events, primarily used by `FlowController` to track throttling and can be expanded in the future to keep more records."],["The class offers one primary method, `getLastFlowControlEvent()`, which returns the last flow control event as a `FlowControlEventStats.FlowControlEvent` object."],["`FlowControlEventStats` can be used to dynamically adjust client concurrency by checking for recent throttling events and, if found, can increase the thresholds, shown through an example in the content."],["The latest version of the `FlowControlEventStats` documentation is 2.63.1, with access to historical versions back to 2.7.1 available in the provided list."]]],[]]