Represent the resource used by a batch including element and byte. It can also be extended to
other things to determine if adding a new element needs to be flow controlled or if the current
batch needs to be flushed.
[[["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\u003eBatchResource\u003c/code\u003e interface within the Google API Client Libraries for Java (gax) project, spanning multiple versions.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version available is 2.63.1, but version 2.54.1 is currently displayed, and older versions are also accessible, with the list of available versions going down to 2.7.1.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBatchResource\u003c/code\u003e interface is used to represent resources used in batch operations, including the number of elements and bytes in a batch, and allows the resource to determine if adding an element to the batch requires flow control or if a flush of the batch is needed.\u003c/p\u003e\n"],["\u003cp\u003eThe interface includes methods to \u003ccode\u003eadd\u003c/code\u003e another resource, get the current \u003ccode\u003ebyte count\u003c/code\u003e and \u003ccode\u003eelement count\u003c/code\u003e, and \u003ccode\u003eshouldFlush\u003c/code\u003e, which determines if the batch should be flushed based on given thresholds.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eshouldFlush\u003c/code\u003e method takes two long parameters, \u003ccode\u003emaxElementThreshold\u003c/code\u003e and \u003ccode\u003emaxBytesThreshold\u003c/code\u003e, and returns a boolean indicating if the batch should be flushed.\u003c/p\u003e\n"]]],[],null,[]]