Package com.google.api.gax.batching
Class AccumulatingBatchReceiver<T>
java.lang.Object
com.google.api.gax.batching.AccumulatingBatchReceiver<T>
- All Implemented Interfaces:
ThresholdBatchReceiver<T>
A simple ThresholdBatchReceiver that just accumulates batches.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the accumulated batches.ApiFuture<?>processBatch(T batch) Process the given batch asynchronously.voidvalidateBatch(T message) Validate that the batch can be received by this ThresholdBatchReceiver.
-
Constructor Details
-
AccumulatingBatchReceiver
-
-
Method Details
-
validateBatch
Description copied from interface:ThresholdBatchReceiverValidate that the batch can be received by this ThresholdBatchReceiver. This is called to validate a batch before it is sent to the ThresholdBatcher.- Specified by:
validateBatchin interfaceThresholdBatchReceiver<T>
-
processBatch
Description copied from interface:ThresholdBatchReceiverProcess the given batch asynchronously.- Specified by:
processBatchin interfaceThresholdBatchReceiver<T>
-
getBatches
Returns the accumulated batches. If called concurrently withprocessBatch, the new batch may or may not be returned.
-