Package com.google.api.gax.batching
Class ThresholdBatcher.Builder<E>
java.lang.Object
com.google.api.gax.batching.ThresholdBatcher.Builder<E>
- Enclosing class:
- ThresholdBatcher<E>
Builder for a ThresholdBatcher.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the ThresholdBatcher.setBatchMerger(BatchMerger<E> batchMerger) Set the batch merger for the ThresholdBatcher.setExecutor(ScheduledExecutorService executor) Set the executor for the ThresholdBatcher.setFlowController(BatchingFlowController<E> flowController) Set the flow controller for the ThresholdBatcher.setMaxDelay(org.threeten.bp.Duration maxDelay) This method is obsolete.setMaxDelayDuration(Duration maxDelay) Set the max delay for a batch.setReceiver(ThresholdBatchReceiver<E> receiver) Set the threshold batch receiver for the ThresholdBatcher.setThresholds(Collection<BatchingThreshold<E>> thresholds) Set the thresholds for the ThresholdBatcher.
-
Method Details
-
setExecutor
Set the executor for the ThresholdBatcher. -
setMaxDelayDuration
Set the max delay for a batch. This is counted from the first item added to a batch. -
setMaxDelay
@ObsoleteApi("Use setMaxDelayDuration(java.time.Duration) instead") public ThresholdBatcher.Builder<E> setMaxDelay(org.threeten.bp.Duration maxDelay) This method is obsolete. UsesetMaxDelayDuration(Duration)instead -
setThresholds
Set the thresholds for the ThresholdBatcher. -
setReceiver
Set the threshold batch receiver for the ThresholdBatcher. -
setFlowController
Set the flow controller for the ThresholdBatcher. -
setBatchMerger
Set the batch merger for the ThresholdBatcher. -
build
Build the ThresholdBatcher.
-