Class BatcherImpl<ElementT,​ElementResultT,​RequestT,​ResponseT>

  • Type Parameters:
    ElementT - The type of each individual element to be batched.
    ElementResultT - The type of the result for each individual element.
    RequestT - The type of the request that will contain the accumulated elements.
    ResponseT - The type of the response that will unpack into individual element results.
    All Implemented Interfaces:
    Batcher<ElementT,​ElementResultT>, java.lang.AutoCloseable

    @InternalApi("For google-cloud-java client use only")
    public class BatcherImpl<ElementT,​ElementResultT,​RequestT,​ResponseT>
    extends java.lang.Object
    implements Batcher<ElementT,​ElementResultT>
    Queues up the elements until flush() is called; once batching is over, returned future resolves.

    This class is not thread-safe, and expects to be used from a single thread.