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 webpage provides documentation for various versions of the \u003ccode\u003eBatch\u003c/code\u003e class in the Google API Client Library for Java (gax), ranging from version 2.7.1 to the latest version, 2.63.1.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBatch\u003c/code\u003e class is designed to combine multiple requests into a single API call, using \u003ccode\u003eUnaryCallable\u003c/code\u003e and \u003ccode\u003eBatchedRequestIssuer\u003c/code\u003e objects for handling individual requests.\u003c/p\u003e\n"],["\u003cp\u003eExisting batches can be combined using the \u003ccode\u003emerge()\u003c/code\u003e method, facilitating the aggregation of multiple requests into one, and using \u003ccode\u003eRequestBuilder\u003c/code\u003e to make the single request.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBatch\u003c/code\u003e class is intended for advanced usage and provides methods to retrieve information such as byte count, the associated callable object, the overall request, and the list of request issuers.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides a public constructor for creation, and provides methods to get information from the \u003ccode\u003eBatch\u003c/code\u003e, as well as the ability to \u003ccode\u003emerge()\u003c/code\u003e another \u003ccode\u003eBatch\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]