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\u003eThis webpage provides documentation for the \u003ccode\u003eBatch\u003c/code\u003e class within the Google API Client Library for Java, specifically under version 2.19.6 of the library.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBatch\u003c/code\u003e class allows for grouping multiple requests into a single API call, enhancing efficiency, and it utilizes \u003ccode\u003eUnaryCallable\u003c/code\u003e and \u003ccode\u003eBatchedRequestIssuer\u003c/code\u003e objects to manage these requests.\u003c/p\u003e\n"],["\u003cp\u003eYou can combine multiple batches together using the \u003ccode\u003emerge\u003c/code\u003e method, streamlining the process, with requests being combined using a \u003ccode\u003eRequestBuilder\u003c/code\u003e into a single request.\u003c/p\u003e\n"],["\u003cp\u003eThe class has a constructor that requires a \u003ccode\u003eBatchingDescriptor\u003c/code\u003e, a request, a \u003ccode\u003eUnaryCallable\u003c/code\u003e, and a \u003ccode\u003eBatchedFuture\u003c/code\u003e, all of which are parameterized with Request and Response types.\u003c/p\u003e\n"],["\u003cp\u003eThe document lists many versions of the Batch class from 2.63.1 down to 2.7.1, showcasing a range of available versions for potential users.\u003c/p\u003e\n"]]],[],null,[]]