Class BatchingCallSettings<ElementT,​ElementResultT,​RequestT,​ResponseT>

  • Type Parameters:
    ElementT - The type of each individual element to be batched.
    ElementResultT - The type of the result for each individual element.
    RequestT - The type of the request that will contain the accumulated elements.
    ResponseT - The type of the response that will unpack into individual element results.

    public final class BatchingCallSettings<ElementT,​ElementResultT,​RequestT,​ResponseT>
    extends UnaryCallSettings<RequestT,​ResponseT>
    This is an extension of UnaryCallSettings class to configure a UnaryCallable for calls to an API method that supports batching. The batching settings are provided using the instance of BatchingSettings.

    Retry configuration will be applied on each batching RPC request.

    Sample settings configuration:

    
     BatchingCallSettings batchingCallSettings = // Default BatchingCallSettings from the client
     BatchingCallSettings customBatchingCallSettings =
         batchingCallSettings
             .toBuilder()
             .setRetryableCodes(StatusCode.Code.UNAVAILABLE, ...)
             .setRetrySettings(RetrySettings.newBuilder()...build())
             .setBatchingSettings(BatchingSettings.newBuilder()...build())
             .build();