A Batch contains a collection of requests that are to be batched into a single API call.
A Batch contains a singleUnaryCallableobject, which will be used to make the API
call, and a list ofBatchedRequestIssuerobjects, which represent the individual requests
in the batch.
Additional batches can be merged into an existing batch using the <xref uid="com.google.api.gax.rpc.Batch.merge(com.google.api.gax.rpc.Batch<RequestT,ResponseT>)" data-throw-if-not-resolved="false">#merge(Batch)
method. Request objects are combined using aRequestBuilderinto a single request.
This is public only for technical reasons, for advanced usage.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThe provided content is a documentation page for the \u003ccode\u003eBatch\u003c/code\u003e class in the Google API Client Library for Java, specifically within the \u003ccode\u003ecom.google.api.gax.rpc\u003c/code\u003e package, with version 2.22.0 being a focal point.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBatch\u003c/code\u003e class is designed to group multiple requests into a single API call, utilizing a \u003ccode\u003eUnaryCallable\u003c/code\u003e object to make the call and \u003ccode\u003eBatchedRequestIssuer\u003c/code\u003e objects to represent individual requests within the batch.\u003c/p\u003e\n"],["\u003cp\u003eMultiple \u003ccode\u003eBatch\u003c/code\u003e instances can be combined into one using the \u003ccode\u003emerge\u003c/code\u003e method, which is used to compile and build requests through the use of a \u003ccode\u003eRequestBuilder\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe page contains a list of various versions of the Batch class with the latest being 2.63.1, with many other versions listed going all the way back to 2.7.1.\u003c/p\u003e\n"],["\u003cp\u003eThe Batch class has a constructor \u003ccode\u003eBatch(BatchingDescriptor<RequestT,ResponseT> descriptor, RequestT request, UnaryCallable<RequestT,ResponseT> callable, BatchedFuture<ResponseT> batchedFuture)\u003c/code\u003e and methods to get byte count, callable, request, and request list.\u003c/p\u003e\n"]]],[],null,[]]