Package com.google.api.gax.rpc
Class UnaryCallSettings.Builder<RequestT,ResponseT>
java.lang.Object
com.google.api.gax.rpc.UnaryCallSettings.Builder<RequestT,ResponseT>
- Direct Known Subclasses:
BatchingCallSettings.Builder,BatchingCallSettings.Builder,PagedCallSettings.Builder
- Enclosing class:
- UnaryCallSettings<RequestT,
ResponseT>
A base builder class for
UnaryCallSettings. This class should not be used to create an
instance of the base class UnaryCallSettings. See the class documentation of UnaryCallSettings for a description of the different values that can be set, and for a
description of when this builder may be used. Builders for concrete derived classes can be used
to create instances of those classes.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBuilder()protectedBuilder(UnaryCallSettings<RequestT, ResponseT> unaryCallSettings) -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an instance of the containing class.See the class documentation ofUnaryCallSettingsfor a description of what retryable codes do.Returns an immutableRetrySettingscurrently set in this Builder.Returns the underlyingRetrySettings.Builder, which allows callers to augment the existingRetrySettings.setRetryableCodes(StatusCode.Code... codes) See the class documentation ofUnaryCallSettingsfor a description of what retryable codes do.setRetryableCodes(Set<StatusCode.Code> retryableCodes) See the class documentation ofUnaryCallSettingsfor a description of what retryable codes do.setRetrySettings(RetrySettings retrySettings) Replaces theRetrySettingsfor the associatedUnaryCallable.setSimpleTimeoutNoRetries(org.threeten.bp.Duration timeout) This method is obsolete.Disables retries and sets the RPC timeout.
-
Constructor Details
-
Builder
protected Builder() -
Builder
-
-
Method Details
-
setRetryableCodes
public UnaryCallSettings.Builder<RequestT,ResponseT> setRetryableCodes(Set<StatusCode.Code> retryableCodes) See the class documentation ofUnaryCallSettingsfor a description of what retryable codes do. -
setRetryableCodes
See the class documentation ofUnaryCallSettingsfor a description of what retryable codes do. -
retrySettings
Returns the underlyingRetrySettings.Builder, which allows callers to augment the existingRetrySettings. -
setRetrySettings
Replaces theRetrySettingsfor the associatedUnaryCallable.When using the method, make sure that the
RetrySettingsare complete. For example, the following code will disable retries because the retry delay is not set:stubSettings.setRetrySettings( RetrySettings.newBuilder() .setTotalTimeout(Duration.ofSeconds(10) );- See Also:
-
setSimpleTimeoutNoRetries
@ObsoleteApi("Use setSimpleTimeoutNoRetriesDuration(java.time.Duration) instead") public UnaryCallSettings.Builder<RequestT,ResponseT> setSimpleTimeoutNoRetries(org.threeten.bp.Duration timeout) This method is obsolete. UsesetSimpleTimeoutNoRetriesDuration(java.time.Duration)instead. -
setSimpleTimeoutNoRetriesDuration
public UnaryCallSettings.Builder<RequestT,ResponseT> setSimpleTimeoutNoRetriesDuration(Duration timeout) Disables retries and sets the RPC timeout. -
getRetryableCodes
See the class documentation ofUnaryCallSettingsfor a description of what retryable codes do. -
getRetrySettings
Returns an immutableRetrySettingscurrently set in this Builder.Unlike
retrySettings(), objects returned by this method are frozen in time. -
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.
-