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\u003eThe latest version of the \u003ccode\u003eBatchResource\u003c/code\u003e is 2.63.1, with various other versions available, down to 2.7.1.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eBatchResource\u003c/code\u003e 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.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eadd(BatchResource resource)\u003c/code\u003e method allows for the addition of an additional resource, and returns the current resource.\u003c/p\u003e\n"],["\u003cp\u003eThe methods \u003ccode\u003egetByteCount()\u003c/code\u003e and \u003ccode\u003egetElementCount()\u003c/code\u003e return the byte count and element count of the resource, respectively, both as long integers.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eshouldFlush(long maxElementThreshold, long maxBytesThreshold)\u003c/code\u003e method determines if the \u003ccode\u003eBatchResource\u003c/code\u003e should be flushed based on specified element and byte thresholds, returning a boolean value.\u003c/p\u003e\n"]]],[],null,[]]