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-04-09 UTC."],[[["The latest version of the `BatchResource` is 2.63.1, with various other versions available, down to 2.7.1."],["`BatchResource` is an interface used by a batch to track elements and bytes, and it can be extended to include other factors for flow control or determining if the batch needs to be flushed."],["The `add(BatchResource resource)` method allows for the addition of an additional resource, and returns the current resource."],["The methods `getByteCount()` and `getElementCount()` return the byte count and element count of the resource, respectively, both as long integers."],["The `shouldFlush(long maxElementThreshold, long maxBytesThreshold)` method determines if the `BatchResource` should be flushed based on specified element and byte thresholds, returning a boolean value."]]],[]]