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#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.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBatch\u003c/code\u003e class is designed to combine multiple requests into a single API call, optimizing for efficiency when making numerous API requests at once, and it uses \u003ccode\u003eUnaryCallable\u003c/code\u003e and \u003ccode\u003eBatchedRequestIssuer\u003c/code\u003e for making said requests.\u003c/p\u003e\n"],["\u003cp\u003eIt offers a \u003ccode\u003emerge()\u003c/code\u003e method to combine multiple batches and a \u003ccode\u003egetCallable()\u003c/code\u003e method to get the callable being used.\u003c/p\u003e\n"],["\u003cp\u003eThe page displays a list of many versions of the Batch class ranging from 2.63.1 all the way to 2.7.1, and version 2.14.0 is featured prominently in the documentation.\u003c/p\u003e\n"],["\u003cp\u003eThe Batch class has a constructor that takes in several parameters to initiate a new batch, and get methods for byte count, the request itself, and the request issuer list.\u003c/p\u003e\n"]]],[],null,[]]