Class BatchingCallSettings.Builder<RequestT,ResponseT> (2.22.0)

public static class BatchingCallSettings.Builder<RequestT,ResponseT> extends UnaryCallSettings.Builder<RequestT,ResponseT>

Inheritance

java.lang.Object > UnaryCallSettings.Builder > BatchingCallSettings.Builder<RequestT,ResponseT>

Type Parameters

NameDescription
RequestT
ResponseT

Constructors

Builder(BatchingCallSettings<RequestT,ResponseT> settings)

public Builder(BatchingCallSettings<RequestT,ResponseT> settings)
Parameter
NameDescription
settingsBatchingCallSettings<RequestT,ResponseT>

Builder(BatchingDescriptor<RequestT,ResponseT> batchingDescriptor)

public Builder(BatchingDescriptor<RequestT,ResponseT> batchingDescriptor)
Parameter
NameDescription
batchingDescriptorBatchingDescriptor<RequestT,ResponseT>

Methods

build()

public BatchingCallSettings<RequestT,ResponseT> build()

Builds an instance of the containing class. This operation is unsupported on the abstract base class UnaryCallSettings, but is valid on concrete derived classes.

Returns
TypeDescription
BatchingCallSettings<RequestT,ResponseT>
Overrides

getBatchingDescriptor()

public BatchingDescriptor<RequestT,ResponseT> getBatchingDescriptor()
Returns
TypeDescription
BatchingDescriptor<RequestT,ResponseT>

getBatchingSettings()

public BatchingSettings getBatchingSettings()
Returns
TypeDescription
BatchingSettings

getFlowController()

public FlowController getFlowController()
Returns
TypeDescription
FlowController

setBatchingSettings(BatchingSettings batchingSettings)

public BatchingCallSettings.Builder<RequestT,ResponseT> setBatchingSettings(BatchingSettings batchingSettings)
Parameter
NameDescription
batchingSettingsBatchingSettings
Returns
TypeDescription
Builder<RequestT,ResponseT>

setFlowController(FlowController flowController)

public BatchingCallSettings.Builder<RequestT,ResponseT> setFlowController(FlowController flowController)
Parameter
NameDescription
flowControllerFlowController
Returns
TypeDescription
Builder<RequestT,ResponseT>

setRetrySettings(RetrySettings retrySettings)

public BatchingCallSettings.Builder<RequestT,ResponseT> setRetrySettings(RetrySettings retrySettings)

Replaces the RetrySettings for the associated UnaryCallable.

When using the method, make sure that the RetrySettings are complete. For example, the following code will disable retries because the retry delay is not set:


 stubSettings.setRetrySettings(
   RetrySettings.newBuilder()
     .setTotalTimeout(Duration.ofSeconds(10)
 );
 
Parameter
NameDescription
retrySettingsRetrySettings
Returns
TypeDescription
Builder<RequestT,ResponseT>
Overrides

setRetryableCodes(StatusCode.Code[] codes)

public BatchingCallSettings.Builder<RequestT,ResponseT> setRetryableCodes(StatusCode.Code[] codes)

See the class documentation of UnaryCallSettings for a description of what retryable codes do.

Parameter
NameDescription
codesCode[]
Returns
TypeDescription
Builder<RequestT,ResponseT>
Overrides

setRetryableCodes(Set<StatusCode.Code> retryableCodes)

public BatchingCallSettings.Builder<RequestT,ResponseT> setRetryableCodes(Set<StatusCode.Code> retryableCodes)

See the class documentation of UnaryCallSettings for a description of what retryable codes do.

Parameter
NameDescription
retryableCodesSet<Code>
Returns
TypeDescription
Builder<RequestT,ResponseT>
Overrides