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) library, showcasing a range of versions from 2.7.1 up to the latest 2.63.1.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBatchResource\u003c/code\u003e interface is used to represent a resource in a batch operation and includes methods to track element and byte counts within the batch.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eadd(BatchResource resource)\u003c/code\u003e method allows you to combine multiple \u003ccode\u003eBatchResource\u003c/code\u003e objects into a single resource, likely for use in batch operations.\u003c/p\u003e\n"],["\u003cp\u003eThe interface includes methods \u003ccode\u003egetByteCount()\u003c/code\u003e and \u003ccode\u003egetElementCount()\u003c/code\u003e to retrieve the total byte and element counts within the resource respectively.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eshouldFlush(long maxElementThreshold, long maxBytesThreshold)\u003c/code\u003e method determines whether a batch operation should be triggered based on the provided element and byte thresholds.\u003c/p\u003e\n"]]],[],null,[]]