Class AccumulatingBatchReceiver<T> (2.51.0)

public final class AccumulatingBatchReceiver<T> implements ThresholdBatchReceiver<T>

A simple ThresholdBatchReceiver that just accumulates batches.

Inheritance

java.lang.Object > AccumulatingBatchReceiver<T>

Implements

com.google.api.gax.batching.ThresholdBatchReceiver<T>

Type Parameter

Name Description
T

Constructors

AccumulatingBatchReceiver(ApiFuture<?> retFuture)

public AccumulatingBatchReceiver(ApiFuture<?> retFuture)
Parameter
Name Description
retFuture ApiFuture<?>

Methods

getBatches()

public List<T> getBatches()

Returns the accumulated batches. If called concurrently with processBatch, the new batch may or may not be returned.

Returns
Type Description
List<T>

processBatch(T batch)

public ApiFuture<?> processBatch(T batch)
Parameter
Name Description
batch T
Returns
Type Description
ApiFuture<?>

validateBatch(T message)

public void validateBatch(T message)
Parameter
Name Description
message T