Class AccumulatingBatchReceiver<T> (2.20.1)

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

NameDescription
T

Constructors

AccumulatingBatchReceiver(ApiFuture<?> retFuture)

public AccumulatingBatchReceiver(ApiFuture<?> retFuture)
Parameter
NameDescription
retFuturecom.google.api.core.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
TypeDescription
List<T>

processBatch(T batch)

public ApiFuture<?> processBatch(T batch)
Parameter
NameDescription
batchT
Returns
TypeDescription
com.google.api.core.ApiFuture<?>

validateBatch(T message)

public void validateBatch(T message)
Parameter
NameDescription
messageT