Package com.google.api.gax.rpc
Class ServerStreamingCallSettings.Builder<RequestT,ResponseT>
java.lang.Object
com.google.api.gax.rpc.StreamingCallSettings.Builder<RequestT,ResponseT>
com.google.api.gax.rpc.ServerStreamingCallSettings.Builder<RequestT,ResponseT>
- Enclosing class:
- ServerStreamingCallSettings<RequestT,
ResponseT>
public static class ServerStreamingCallSettings.Builder<RequestT,ResponseT>
extends StreamingCallSettings.Builder<RequestT,ResponseT>
-
Method Summary
Modifier and TypeMethodDescriptionbuild()org.threeten.bp.Durationorg.threeten.bp.DurationReturns the underlyingRetrySettings.Builder, which allows callers to augment the existingRetrySettings.setIdleTimeout(org.threeten.bp.Duration idleTimeout) Set how long to wait before considering the stream orphaned by the user and closing it.setResumptionStrategy(StreamResumptionStrategy<RequestT, ResponseT> resumptionStrategy) See the class documentation ofServerStreamingCallSettingsfor a description of what StreamResumptionStrategy does.setRetryableCodes(StatusCode.Code... codes) See the class documentation ofServerStreamingCallSettingsfor a description of what retryableCodes do.setRetryableCodes(Set<StatusCode.Code> retryableCodes) See the class documentation ofServerStreamingCallSettingsfor a description of what retryableCodes do.setRetrySettings(RetrySettings retrySettings) Replaces theRetrySettingsfor the associatedServerStreamingCallable.setSimpleTimeoutNoRetries(org.threeten.bp.Duration timeout) Disables retries and sets the overall timeout.setWaitTimeout(org.threeten.bp.Duration waitTimeout) Set the maximum amount of time to wait for the next message from the server.
-
Method Details
-
setRetryableCodes
public ServerStreamingCallSettings.Builder<RequestT,ResponseT> setRetryableCodes(StatusCode.Code... codes) See the class documentation ofServerStreamingCallSettingsfor a description of what retryableCodes do. -
setRetryableCodes
public ServerStreamingCallSettings.Builder<RequestT,ResponseT> setRetryableCodes(Set<StatusCode.Code> retryableCodes) See the class documentation ofServerStreamingCallSettingsfor a description of what retryableCodes do. -
getRetryableCodes
-
retrySettings
Returns the underlyingRetrySettings.Builder, which allows callers to augment the existingRetrySettings. -
setRetrySettings
public ServerStreamingCallSettings.Builder<RequestT,ResponseT> setRetrySettings(@Nonnull RetrySettings retrySettings) Replaces theRetrySettingsfor the associatedServerStreamingCallable.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:
-
getRetrySettings
-
setSimpleTimeoutNoRetries
public ServerStreamingCallSettings.Builder<RequestT,ResponseT> setSimpleTimeoutNoRetries(@Nonnull org.threeten.bp.Duration timeout) Disables retries and sets the overall timeout. -
setResumptionStrategy
public ServerStreamingCallSettings.Builder<RequestT,ResponseT> setResumptionStrategy(@Nonnull StreamResumptionStrategy<RequestT, ResponseT> resumptionStrategy) See the class documentation ofServerStreamingCallSettingsfor a description of what StreamResumptionStrategy does. -
getResumptionStrategy
-
getIdleTimeout
-
setIdleTimeout
public ServerStreamingCallSettings.Builder<RequestT,ResponseT> setIdleTimeout(@Nonnull org.threeten.bp.Duration idleTimeout) Set how long to wait before considering the stream orphaned by the user and closing it.Duration.ZEROdisables the check for abandoned streams. -
getWaitTimeout
-
setWaitTimeout
public ServerStreamingCallSettings.Builder<RequestT,ResponseT> setWaitTimeout(@Nonnull org.threeten.bp.Duration waitTimeout) Set the maximum amount of time to wait for the next message from the server.Duration.ZEROdisables the check for abandoned streams. -
build
- Overrides:
buildin classStreamingCallSettings.Builder<RequestT,ResponseT>
-