Package com.google.api.gax.rpc
Class UnaryCallSettings<RequestT,ResponseT>
- java.lang.Object
-
- com.google.api.gax.rpc.UnaryCallSettings<RequestT,ResponseT>
-
- Direct Known Subclasses:
BatchingCallSettings
,BatchingCallSettings
,PagedCallSettings
@InternalExtensionOnly public class UnaryCallSettings<RequestT,ResponseT> extends Object
A base settings class to configure a UnaryCallable. An instance of UnaryCallSettings is not sufficient on its own to construct a UnaryCallable; a concrete derived type is necessary.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 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UnaryCallSettings.Builder<RequestT,ResponseT>
A base builder class forUnaryCallSettings
.
-
Constructor Summary
Constructors Modifier Constructor Description protected
UnaryCallSettings(UnaryCallSettings.Builder<RequestT,ResponseT> builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Set<StatusCode.Code>
getRetryableCodes()
See the class documentation ofUnaryCallSettings
for a description of what retryable codes do.RetrySettings
getRetrySettings()
See the class documentation ofUnaryCallSettings
for a description of what retry settings do.int
hashCode()
static <RequestT,ResponseT>
UnaryCallSettings.Builder<RequestT,ResponseT>newUnaryCallSettingsBuilder()
UnaryCallSettings.Builder<RequestT,ResponseT>
toBuilder()
String
toString()
-
-
-
Constructor Detail
-
UnaryCallSettings
protected UnaryCallSettings(UnaryCallSettings.Builder<RequestT,ResponseT> builder)
-
-
Method Detail
-
getRetryableCodes
public final Set<StatusCode.Code> getRetryableCodes()
See the class documentation ofUnaryCallSettings
for a description of what retryable codes do.
-
getRetrySettings
public final RetrySettings getRetrySettings()
See the class documentation ofUnaryCallSettings
for a description of what retry settings do.
-
newUnaryCallSettingsBuilder
public static <RequestT,ResponseT> UnaryCallSettings.Builder<RequestT,ResponseT> newUnaryCallSettingsBuilder()
-
toBuilder
public UnaryCallSettings.Builder<RequestT,ResponseT> toBuilder()
-
-