Queues up elements until either a duration of time has passed or any threshold in a given set of
thresholds is breached, and then delivers the elements in a batch to the consumer.
Adds an element to the batcher. If the element causes the collection to go past any of the
thresholds, the batch will be sent to theThresholdBatchReceiver.
Push the current batch to the batch receiver. Returns an ApiFuture that completes once the
batch has been processed by the batch receiver and the flow controller resources have been
released.
Note that this future can complete for the current batch before previous batches have
completed, so it cannot be depended upon for flushing.
[[["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\u003eThresholdBatcher\u003c/code\u003e class in the Google API client library for Java, with the latest version being 2.63.1.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eThresholdBatcher\u003c/code\u003e class queues elements and delivers them in batches to a consumer when a time duration has passed or a set threshold is breached.\u003c/p\u003e\n"],["\u003cp\u003eThe class inherits from \u003ccode\u003ejava.lang.Object\u003c/code\u003e and includes static methods like \u003ccode\u003enewBuilder()\u003c/code\u003e for creating a new \u003ccode\u003eThresholdBatcher\u003c/code\u003e, as well as instance methods such as \u003ccode\u003eadd(E e)\u003c/code\u003e to add elements, and \u003ccode\u003epushCurrentBatch()\u003c/code\u003e to send the current batch.\u003c/p\u003e\n"],["\u003cp\u003eThere is a full list of all versions of ThresholdBatcher available, from version 2.63.1 down to version 2.7.1.\u003c/p\u003e\n"],["\u003cp\u003eThe ThresholdBatcher documentation includes information on inherited members, static methods, and instance methods with parameter and exception details, along with a table showing the Type Parameter.\u003c/p\u003e\n"]]],[],null,[]]