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.@BetaApi(value="The surface for batching is not stable yet and may change in the future.") public final class BatchingCallSettings<ElementT,ElementResultT,RequestT,ResponseT> extends UnaryCallSettings<RequestT,ResponseT>
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
BatchingCallSettings.Builder<ElementT,ElementResultT,RequestT,ResponseT>
A base builder class for
BatchingCallSettings. |
| Modifier and Type | Method and Description |
|---|---|
BatchingDescriptor<ElementT,ElementResultT,RequestT,ResponseT> |
getBatchingDescriptor() |
BatchingSettings |
getBatchingSettings()
Returns batching settings which contains multiple batch threshold levels.
|
static <ElementT,ElementResultT,RequestT,ResponseT> |
newBuilder(BatchingDescriptor<ElementT,ElementResultT,RequestT,ResponseT> batchingDescriptor)
Please use
toBuilder() to override settings values. |
BatchingCallSettings.Builder<ElementT,ElementResultT,RequestT,ResponseT> |
toBuilder()
Get a builder with the same values as this object.
|
String |
toString() |
equals, getRetryableCodes, getRetrySettings, hashCode, newUnaryCallSettingsBuilder@InternalApi(value="For google-cloud-java client use only") public BatchingDescriptor<ElementT,ElementResultT,RequestT,ResponseT> getBatchingDescriptor()
public BatchingSettings getBatchingSettings()
@InternalApi(value="For google-cloud-java client use only") public static <ElementT,ElementResultT,RequestT,ResponseT> BatchingCallSettings.Builder<ElementT,ElementResultT,RequestT,ResponseT> newBuilder(BatchingDescriptor<ElementT,ElementResultT,RequestT,ResponseT> batchingDescriptor)
toBuilder() to override settings values.public final BatchingCallSettings.Builder<ElementT,ElementResultT,RequestT,ResponseT> toBuilder()
BatchingCallSettings for a sample settings configuration.toBuilder in class UnaryCallSettings<RequestT,ResponseT>public String toString()
toString in class UnaryCallSettings<RequestT,ResponseT>