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-03 UTC."],[[["\u003cp\u003eThis webpage provides documentation for the \u003ccode\u003eBatchingThreshold\u003c/code\u003e interface in the Google API Client Library for Java, specifically within the \u003ccode\u003ecom.google.api.gax.batching\u003c/code\u003e package.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBatchingThreshold\u003c/code\u003e interface is designed for use with \u003ccode\u003eThresholdBatcher\u003c/code\u003e, managing batching thresholds and accumulated values.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of \u003ccode\u003eBatchingThreshold\u003c/code\u003e is version \u003ccode\u003e2.63.1\u003c/code\u003e, and the documentation page provides access to a range of previous versions, dating back to \u003ccode\u003e2.7.1\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eBatchingThreshold\u003c/code\u003e includes methods like \u003ccode\u003eaccumulate(E e)\u003c/code\u003e, \u003ccode\u003ecopyWithZeroedValue()\u003c/code\u003e, and \u003ccode\u003eisThresholdReached()\u003c/code\u003e, which are used to track the elements added to the batch, and determine when a batch should be processed, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation specifies that methods within \u003ccode\u003eBatchingThreshold\u003c/code\u003e are thread-safe when called from \u003ccode\u003eThresholdBatcher\u003c/code\u003e because they will be under a lock.\u003c/p\u003e\n"]]],[],null,[]]