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 latest version of the Batch class is 2.63.1, and it is accessible through a provided link, with many other past versions also listed.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBatch\u003c/code\u003e class in Java contains a collection of requests to be batched into a single API call, with its API call being made via a UnaryCallable object.\u003c/p\u003e\n"],["\u003cp\u003eBatches can be combined with the \u003ccode\u003emerge()\u003c/code\u003e method, which then uses a RequestBuilder to combine individual requests.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBatch\u003c/code\u003e class has several methods, such as \u003ccode\u003egetByteCount()\u003c/code\u003e, \u003ccode\u003egetCallable()\u003c/code\u003e, \u003ccode\u003egetRequest()\u003c/code\u003e, and \u003ccode\u003egetRequestIssuerList()\u003c/code\u003e, that provide information about the batch.\u003c/p\u003e\n"],["\u003cp\u003eThe Batch class is a generic class with two type parameters, RequestT and ResponseT, in its definition, and it has a constructor that takes a BatchingDescriptor, request, UnaryCallable, and BatchedFuture as parameters.\u003c/p\u003e\n"]]],[],null,[]]