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>
public static class ThresholdBatcher.Builder<E> extends java.lang.ObjectBuilder for a ThresholdBatcher.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThresholdBatcher<E>build()Build the ThresholdBatcher.ThresholdBatcher.Builder<E>setBatchMerger(BatchMerger<E> batchMerger)Set the batch merger for the ThresholdBatcher.ThresholdBatcher.Builder<E>setExecutor(java.util.concurrent.ScheduledExecutorService executor)Set the executor for the ThresholdBatcher.ThresholdBatcher.Builder<E>setFlowController(BatchingFlowController<E> flowController)Set the flow controller for the ThresholdBatcher.ThresholdBatcher.Builder<E>setMaxDelay(org.threeten.bp.Duration maxDelay)Set the max delay for a batch.ThresholdBatcher.Builder<E>setReceiver(ThresholdBatchReceiver<E> receiver)Set the threshold batch receiver for the ThresholdBatcher.ThresholdBatcher.Builder<E>setThresholds(java.util.Collection<BatchingThreshold<E>> thresholds)Set the thresholds for the ThresholdBatcher.
-
-
-
Method Detail
-
setExecutor
public ThresholdBatcher.Builder<E> setExecutor(java.util.concurrent.ScheduledExecutorService executor)
Set the executor for the ThresholdBatcher.
-
setMaxDelay
public ThresholdBatcher.Builder<E> setMaxDelay(org.threeten.bp.Duration maxDelay)
Set the max delay for a batch. This is counted from the first item added to a batch.
-
setThresholds
public ThresholdBatcher.Builder<E> setThresholds(java.util.Collection<BatchingThreshold<E>> thresholds)
Set the thresholds for the ThresholdBatcher.
-
setReceiver
public ThresholdBatcher.Builder<E> setReceiver(ThresholdBatchReceiver<E> receiver)
Set the threshold batch receiver for the ThresholdBatcher.
-
setFlowController
public ThresholdBatcher.Builder<E> setFlowController(BatchingFlowController<E> flowController)
Set the flow controller for the ThresholdBatcher.
-
setBatchMerger
public ThresholdBatcher.Builder<E> setBatchMerger(BatchMerger<E> batchMerger)
Set the batch merger for the ThresholdBatcher.
-
build
public ThresholdBatcher<E> build()
Build the ThresholdBatcher.
-
-