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-04-09 UTC."],[[["This webpage lists the documentation for different versions of the `BatchingThreshold` interface in the Google API Client Library for Java, ranging from version 2.7.1 to the latest 2.63.1."],["The `BatchingThreshold` interface is used in `ThresholdBatcher` to represent a configurable limit or condition for batching operations."],["The interface provides three abstract methods: `accumulate(E e)` to add elements, `copyWithZeroedValue()` to create a copy with a reset counter, and `isThresholdReached()` to check if the threshold has been met."],["The `BatchingThreshold` interface is not required to be thread-safe, as any of the methods from the `ThresholdBatcher` will be under a lock."],["The type `E` in `BatchingThreshold\u003cE\u003e` acts as a parameter within the interface, and is only used as the element of the batch in the method `accumulate`."]]],[]]