@BetaApi(value="The surface for batching is not stable yet and may change in the future.") public final class ThresholdBatcher<E> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ThresholdBatcher.Builder<E>
Builder for a ThresholdBatcher.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(E e)
Adds an element to the batcher.
|
static <E> ThresholdBatcher.Builder<E> |
newBuilder()
Get a new builder for a ThresholdBatcher.
|
com.google.api.core.ApiFuture<Void> |
pushCurrentBatch()
Push the current batch to the batch receiver.
|
public static <E> ThresholdBatcher.Builder<E> newBuilder()
public void add(E e) throws FlowController.FlowControlException
ThresholdBatchReceiver.public com.google.api.core.ApiFuture<Void> pushCurrentBatch()
Note that this future can complete for the current batch before previous batches have completed, so it cannot be depended upon for flushing.