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"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-15 UTC."],[[["This webpage provides documentation for the `BatchingThreshold` interface in the Google API Client Libraries for Java (GAX), showcasing a comprehensive version history."],["The latest version of the `BatchingThreshold` interface is version 2.63.1, with an extensive list of historical versions available for reference."],["`BatchingThreshold` is an interface utilized within `ThresholdBatcher` for managing batching thresholds, with no requirement for thread safety when solely used within `ThresholdBatcher`."],["The interface provides three primary methods: `accumulate(E e)` for adding elements to the threshold, `copyWithZeroedValue()` for creating a copy with reset values, and `isThresholdReached()` to check if the threshold has been met."],["All calls into the `accumulate`, `copyWithZeroedValue`, and `isThresholdReached` functions from the `ThresholdBatcher` are done under lock."]]],[]]