Package com.google.api.gax.rpc
Interface BatchingDescriptor<RequestT,ResponseT>
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.
-
Method Summary
Modifier and TypeMethodDescriptionlongcountBytes(RequestT request) Returns the size in bytes of this request.longcountElements(RequestT request) Returns the number of elements contained in this request.getBatchPartitionKey(RequestT request) Returns the value of the partition key for the given request.Get the Builder object for the request type RequestT.voidsplitException(Throwable throwable, Collection<? extends BatchedRequestIssuer<ResponseT>> batch) Splits the exception that resulted from a batched call into an individual setException call on each RequestIssuer.voidsplitResponse(ResponseT batchResponse, Collection<? extends BatchedRequestIssuer<ResponseT>> batch) Splits the result from a batched call into an individual setResponse call on each RequestIssuer.
-
Method Details
-
getBatchPartitionKey
Returns the value of the partition key for the given request. -
getRequestBuilder
RequestBuilder<RequestT> getRequestBuilder()Get the Builder object for the request type RequestT. -
splitResponse
void splitResponse(ResponseT batchResponse, Collection<? extends BatchedRequestIssuer<ResponseT>> batch) Splits the result from a batched call into an individual setResponse call on each RequestIssuer. -
splitException
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. -
countElements
Returns the number of elements contained in this request. -
countBytes
Returns the size in bytes of this request.
-