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.DurationThis method is obsolete.org.threeten.bp.DurationThis method is obsolete.Returns the underlyingRetrySettings.Builder, which allows callers to augment the existingRetrySettings.setIdleTimeout(org.threeten.bp.Duration idleTimeout) This method is obsolete.setIdleTimeoutDuration(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) This method is obsolete.Disables retries and sets the overall timeout.setWaitTimeout(org.threeten.bp.Duration waitTimeout) This method is obsolete.setWaitTimeoutDuration(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
@ObsoleteApi("Use setSimpleTimeoutNoRetriesDuration(java.time.Duration) instead") public ServerStreamingCallSettings.Builder<RequestT,ResponseT> setSimpleTimeoutNoRetries(@Nonnull org.threeten.bp.Duration timeout) This method is obsolete. UsesetSimpleTimeoutNoRetriesDuration(java.time.Duration)instead. -
setSimpleTimeoutNoRetriesDuration
public ServerStreamingCallSettings.Builder<RequestT,ResponseT> setSimpleTimeoutNoRetriesDuration(@Nonnull 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
@Nonnull @ObsoleteApi("Use getIdleTimeoutDuration() instead") public org.threeten.bp.Duration getIdleTimeout()This method is obsolete. UsegetIdleTimeoutDuration()instead. -
getIdleTimeoutDuration
-
setIdleTimeout
@ObsoleteApi("Use setIdleTimeoutDuration(java.time.Duration) instead") public ServerStreamingCallSettings.Builder<RequestT,ResponseT> setIdleTimeout(@Nonnull org.threeten.bp.Duration idleTimeout) This method is obsolete. UsesetIdleTimeoutDuration(Duration)instead. -
setIdleTimeoutDuration
public ServerStreamingCallSettings.Builder<RequestT,ResponseT> setIdleTimeoutDuration(@Nonnull 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
@Nonnull @ObsoleteApi("Use getWaitTimeoutDuration() instead") public org.threeten.bp.Duration getWaitTimeout()This method is obsolete. UsegetWaitTimeoutDuration()instead. -
getWaitTimeoutDuration
-
setWaitTimeout
@ObsoleteApi("Use setWaitTimeoutDuration(java.time.Duration) instead") public ServerStreamingCallSettings.Builder<RequestT,ResponseT> setWaitTimeout(@Nonnull org.threeten.bp.Duration waitTimeout) This method is obsolete. UsesetWaitTimeoutDuration(java.time.Duration)instead. -
setWaitTimeoutDuration
public ServerStreamingCallSettings.Builder<RequestT,ResponseT> setWaitTimeoutDuration(@Nonnull 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>
-