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
-
-
-
Method Detail
-
setRetryableCodes
public ServerStreamingCallSettings.Builder<RequestT,ResponseT> setRetryableCodes(StatusCode.Code... codes)
See the class documentation ofServerStreamingCallSettings
for a description of what retryableCodes do.
-
setRetryableCodes
public ServerStreamingCallSettings.Builder<RequestT,ResponseT> setRetryableCodes(Set<StatusCode.Code> retryableCodes)
See the class documentation ofServerStreamingCallSettings
for a description of what retryableCodes do.
-
getRetryableCodes
@Nonnull public Set<StatusCode.Code> getRetryableCodes()
-
retrySettings
public RetrySettings.Builder retrySettings()
Returns the underlyingRetrySettings.Builder
, which allows callers to augment the existingRetrySettings
.
-
setRetrySettings
public ServerStreamingCallSettings.Builder<RequestT,ResponseT> setRetrySettings(@Nonnull RetrySettings retrySettings)
Replaces theRetrySettings
for the associatedServerStreamingCallable
.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) );
- See Also:
retrySettings()
-
getRetrySettings
@Nonnull public RetrySettings 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 ofServerStreamingCallSettings
for a description of what StreamResumptionStrategy does.
-
getResumptionStrategy
@Nonnull public StreamResumptionStrategy<RequestT,ResponseT> getResumptionStrategy()
-
getIdleTimeout
@Nonnull public org.threeten.bp.Duration 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.ZERO
disables the check for abandoned streams.
-
getWaitTimeout
@Nonnull public org.threeten.bp.Duration 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.ZERO
disables the check for abandoned streams.
-
build
public ServerStreamingCallSettings<RequestT,ResponseT> build()
- Overrides:
build
in classStreamingCallSettings.Builder<RequestT,ResponseT>
-
-