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-08-15 UTC."],[[["\u003cp\u003eThis webpage provides documentation for the \u003ccode\u003eBatchResource\u003c/code\u003e interface within the Google API Client Libraries for Java (gax) library, spanning multiple versions from 2.7.1 to the latest release, 2.63.1.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBatchResource\u003c/code\u003e interface represents a resource used by a batch, including element and byte counts, and can be extended to determine batch flow control and flush conditions.\u003c/p\u003e\n"],["\u003cp\u003eKey methods of the \u003ccode\u003eBatchResource\u003c/code\u003e interface include \u003ccode\u003eadd(BatchResource resource)\u003c/code\u003e for adding resources, \u003ccode\u003egetByteCount()\u003c/code\u003e to retrieve the byte count, and \u003ccode\u003egetElementCount()\u003c/code\u003e to get the element count of the batch.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eshouldFlush(long maxElementThreshold, long maxBytesThreshold)\u003c/code\u003e method allows developers to check if a \u003ccode\u003eBatchResource\u003c/code\u003e needs to be flushed based on the specified thresholds for elements and bytes.\u003c/p\u003e\n"],["\u003cp\u003eThe current version being documented is 2.52.0, where the links below it lead to other versions, with the latest version available at 2.63.1.\u003c/p\u003e\n"]]],[],null,[]]