The interface representing a threshold to be used in ThresholdBatcher. Thresholds do not need to
be thread-safe if they are only used inside ThresholdBatcher.
Type Parameter
Name
Description
E
Methods
accumulate(E e)
publicabstractvoidaccumulate(Ee)
Presents the element to the threshold for the attribute of interest to be accumulated.
Any calls into this function from ThresholdBatcher will be under a lock.
[[["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\u003eBatchingThreshold\u003c/code\u003e interface in the Google API Client Library for Java (GAX), covering versions from 2.63.1 down to 2.7.1.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBatchingThreshold\u003c/code\u003e interface is designed for use with \u003ccode\u003eThresholdBatcher\u003c/code\u003e and does not require thread-safety if confined to use within \u003ccode\u003eThresholdBatcher\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe interface includes three abstract methods: \u003ccode\u003eaccumulate(E e)\u003c/code\u003e, which adds an element to the threshold; \u003ccode\u003ecopyWithZeroedValue()\u003c/code\u003e, which creates a copy with a zeroed accumulated value; and \u003ccode\u003eisThresholdReached()\u003c/code\u003e, which checks if the threshold has been reached.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version documented on the page is 2.63.1, while the oldest documented version available is 2.7.1.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBatchingThreshold\u003c/code\u003e interface offers methods to manage batching limits and keep track of element accumulation, providing a clear way to keep track of how many elements are being batched at once.\u003c/p\u003e\n"]]],[],null,[]]