@InternalExtensionOnly public class UnaryCallSettings<RequestT,ResponseT> extends Object
This base class includes settings that are applicable to all calls, which currently is just retry settings.
Retry configuration is composed of two parts: the retryable codes, and the retry settings. The retryable codes indicate which codes cause a retry to occur, and the retry settings configure the retry logic when the retry needs to happen. To turn off retries, set the retryable codes needs to be set to the empty set.
UnaryCallSettings contains a concrete builder class, UnaryCallSettings.Builder. This
builder class cannot be used to create an instance of UnaryCallSettings, because
UnaryCallSettings is an abstract class.
| Modifier and Type | Class and Description |
|---|---|
static class |
UnaryCallSettings.Builder<RequestT,ResponseT>
A base builder class for
UnaryCallSettings. |
| Modifier | Constructor and Description |
|---|---|
protected |
UnaryCallSettings(UnaryCallSettings.Builder<RequestT,ResponseT> builder) |
| Modifier and Type | Method and Description |
|---|---|
Set<StatusCode.Code> |
getRetryableCodes()
See the class documentation of
UnaryCallSettings for a description of what retryable
codes do. |
RetrySettings |
getRetrySettings()
See the class documentation of
UnaryCallSettings for a description of what retry
settings do. |
static <RequestT,ResponseT> |
newUnaryCallSettingsBuilder() |
UnaryCallSettings.Builder<RequestT,ResponseT> |
toBuilder() |
protected UnaryCallSettings(UnaryCallSettings.Builder<RequestT,ResponseT> builder)
public final Set<StatusCode.Code> getRetryableCodes()
UnaryCallSettings for a description of what retryable
codes do.public final RetrySettings getRetrySettings()
UnaryCallSettings for a description of what retry
settings do.public static <RequestT,ResponseT> UnaryCallSettings.Builder<RequestT,ResponseT> newUnaryCallSettingsBuilder()
public UnaryCallSettings.Builder<RequestT,ResponseT> toBuilder()