Send feedback Interface BatchingDescriptor<RequestT,ResponseT> (2.65.0) Stay organized with collections Save and categorize content based on your preferences.
Version 2.65.0keyboard_arrow_down
public interface BatchingDescriptor<RequestT , ResponseT >
Interface which represents an object that transforms request/response data for the purposes of batching.
Implementations of BatchingDescriptor must guarantee that all methods are stateless and thread safe.
This class is designed to be used by generated code.
Type Parameters Name Description RequestT
ResponseT
Methods countBytes(RequestT request)
public abstract long countBytes ( RequestT request )
Returns the size in bytes of this request.
Parameter Name Description request
RequestT
Returns Type Description long
countElements(RequestT request)
public abstract long countElements ( RequestT request )
Returns the number of elements contained in this request.
Parameter Name Description request
RequestT
Returns Type Description long
getBatchPartitionKey(RequestT request)
public abstract PartitionKey getBatchPartitionKey ( RequestT request )
Returns the value of the partition key for the given request.
Parameter Name Description request
RequestT
getRequestBuilder()
public abstract RequestBuilder<RequestT> getRequestBuilder ()
Get the Builder object for the request type RequestT.
splitException(Throwable throwable, Collection<? extends BatchedRequestIssuer<ResponseT>> batch)
public abstract void splitException ( Throwable throwable , Collection <? extends BatchedRequestIssuer<ResponseT> > batch )
Splits the exception that resulted from a batched call into an individual setException call on each RequestIssuer.
Parameters Name Description throwable
Throwable
batch
Collection <? extends com.google.api.gax.rpc.BatchedRequestIssuer <ResponseT >>
splitResponse(ResponseT batchResponse, Collection<? extends BatchedRequestIssuer<ResponseT>> batch)
public abstract void splitResponse ( ResponseT batchResponse , Collection <? extends BatchedRequestIssuer<ResponseT> > batch )
Splits the result from a batched call into an individual setResponse call on each RequestIssuer.
Parameters Name Description batchResponse
ResponseT
batch
Collection <? extends com.google.api.gax.rpc.BatchedRequestIssuer <ResponseT >>
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-17 UTC.
Need to tell us more? [[["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-06-17 UTC."],[],[]]