Class AccumulatingBatchReceiver<T> (2.33.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

NameDescription
T

Constructors

AccumulatingBatchReceiver(ApiFuture<?> retFuture)

public AccumulatingBatchReceiver(ApiFuture<?> retFuture)
Parameter
NameDescription
retFutureApiFuture<?>

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
ApiFuture<?>

validateBatch(T message)

public void validateBatch(T message)
Parameter
NameDescription
messageT