Class ThresholdBatcher.Builder<E> (2.34.1)
Stay organized with collections
Save and categorize content based on your preferences.
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.
setExecutor(ScheduledExecutorService executor)
public ThresholdBatcher.Builder<E> setExecutor(ScheduledExecutorService executor)
Set the executor for the ThresholdBatcher.
setFlowController(BatchingFlowController<E> flowController)
public ThresholdBatcher.Builder<E> setFlowController(BatchingFlowController<E> flowController)
Set the flow controller for the ThresholdBatcher.
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
|
setReceiver(ThresholdBatchReceiver<E> receiver)
public ThresholdBatcher.Builder<E> setReceiver(ThresholdBatchReceiver<E> receiver)
Set the threshold batch receiver for the ThresholdBatcher.
setThresholds(Collection<BatchingThreshold<E>> thresholds)
public ThresholdBatcher.Builder<E> setThresholds(Collection<BatchingThreshold<E>> thresholds)
Set the thresholds for the ThresholdBatcher.
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-25 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"
}]