Class ThresholdBatcher.Builder<E> (2.68.1)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version 2.68.1keyboard_arrow_down
public static class ThresholdBatcher . Builder<E>
Builder for a ThresholdBatcher.
Type Parameter
Name
Description
E
Methods
build()
public ThresholdBatcher<E> build ()
Build the ThresholdBatcher.
setBatchMerger(BatchMerger<E> batchMerger)
public ThresholdBatcher . Builder<E> setBatchMerger ( BatchMerger<E> batchMerger )
Set the batch merger for the ThresholdBatcher.
Returns
Type
Description
Builder <E >
setExecutor(ScheduledExecutorService executor)
public ThresholdBatcher . Builder<E> setExecutor ( ScheduledExecutorService executor )
Set the executor for the ThresholdBatcher.
Returns
Type
Description
Builder <E >
setFlowController(BatchingFlowController<E> flowController)
public ThresholdBatcher . Builder<E> setFlowController ( BatchingFlowController<E> flowController )
Set the flow controller for the ThresholdBatcher.
Returns
Type
Description
Builder <E >
setMaxDelay(Duration maxDelay)
public ThresholdBatcher . Builder<E> setMaxDelay ( Duration maxDelay )
Obsolete
Use setMaxDelayDuration(java.time.Duration) instead
This feature is stable for usage in this major version, but may be deprecated in a future release.
This method is obsolete. Use #setMaxDelayDuration(Duration) instead
Parameter
Name
Description
maxDelay
org.threeten.bp.Duration
Returns
Type
Description
Builder <E >
setMaxDelayDuration(Duration maxDelay)
public ThresholdBatcher . Builder<E> setMaxDelayDuration ( Duration maxDelay )
Set the max delay for a batch. This is counted from the first item added to a batch.
Parameter
Name
Description
maxDelay
Duration
Returns
Type
Description
Builder <E >
setReceiver(ThresholdBatchReceiver<E> receiver)
public ThresholdBatcher . Builder<E> setReceiver ( ThresholdBatchReceiver<E> receiver )
Set the threshold batch receiver for the ThresholdBatcher.
Returns
Type
Description
Builder <E >
setThresholds(Collection<BatchingThreshold<E>> thresholds)
public ThresholdBatcher . Builder<E> setThresholds ( Collection<BatchingThreshold<E> > thresholds )
Set the thresholds for the ThresholdBatcher.
Returns
Type
Description
Builder <E >
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-15 UTC.
[[["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."],[],[]]