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-03-21 UTC."],[[["This webpage provides documentation for the `BatchResource` interface within the Google API Client Libraries for Java (gax) library, spanning versions from 2.7.1 up to the latest release, 2.63.1."],["The `BatchResource` interface represents a resource used by a batch, including element and byte counts, and is designed to determine if new elements require flow control or if the current batch needs to be flushed."],["The interface defines three primary methods: `add(BatchResource resource)` for adding additional resources, `getByteCount()` to retrieve the byte count, and `getElementCount()` to get the element count."],["The `shouldFlush(long maxElementThreshold, long maxBytesThreshold)` method checks if the `BatchResource` should be flushed based on specified thresholds for the maximum number of elements and bytes."],["The documentation for each version of `BatchResource` can be found by following the links, with the latest being version 2.63.1, and the current selected page being version 2.31.1."]]],[]]