Class ThresholdBatcher.Builder<E> (2.19.2)
Stay organized with collections
Save and categorize content based on your preferences.
public static class ThresholdBatcher.Builder<E>
Builder for a ThresholdBatcher.
Type Parameter
Methods
build()
public ThresholdBatcher<E> build()
Build the ThresholdBatcher.
Returns
setBatchMerger(BatchMerger<E> batchMerger)
public ThresholdBatcher.Builder<E> setBatchMerger(BatchMerger<E> batchMerger)
Set the batch merger for the ThresholdBatcher.
Parameter
Returns
setExecutor(ScheduledExecutorService executor)
public ThresholdBatcher.Builder<E> setExecutor(ScheduledExecutorService executor)
Set the executor for the ThresholdBatcher.
Parameter
Returns
setFlowController(BatchingFlowController<E> flowController)
public ThresholdBatcher.Builder<E> setFlowController(BatchingFlowController<E> flowController)
Set the flow controller for the ThresholdBatcher.
Parameter
Returns
setMaxDelay(Duration maxDelay)
public ThresholdBatcher.Builder<E> setMaxDelay(Duration maxDelay)
Set the max delay for a batch. This is counted from the first item added to a batch.
Parameter
Name | Description |
maxDelay | org.threeten.bp.Duration
|
Returns
setReceiver(ThresholdBatchReceiver<E> receiver)
public ThresholdBatcher.Builder<E> setReceiver(ThresholdBatchReceiver<E> receiver)
Set the threshold batch receiver for the ThresholdBatcher.
Parameter
Returns
setThresholds(Collection<BatchingThreshold<E>> thresholds)
public ThresholdBatcher.Builder<E> setThresholds(Collection<BatchingThreshold<E>> thresholds)
Set the thresholds for the ThresholdBatcher.
Parameter
Returns
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 2023-09-22 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]