Interface ClientConfiguration
@DoNotLog
@Immutable
public interface ClientConfiguration
A context-independent (i.e., does not depend on configuration files or on-disk entities like JKS keystores)
instantiation of a
ServiceConfiguration.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic enumstatic enumstatic enumstatic enum -
Method Summary
Modifier and TypeMethodDescriptionThe size of one backoff time slot for call retries.static ClientConfiguration.Builderbuilder()default voidcheck()Indicates whether client-side sympathetic QoS should be enabled.SeePartialServiceConfiguration.connectTimeout().booleanSeePartialServiceConfiguration.enableGcmCipherSuites().SeePartialServiceConfiguration.enableHttp2().The amount of time a URL marked as failed should be avoided for subsequent calls.booleanSeePartialServiceConfiguration.fallbackToCommonNameVerification().Per-host failures are recorded using this interface.intThe maximum number of times a failed request is retried.Optional<com.google.common.net.HostAndPort> Indicates how the target node is selected for a given request.proxy()The proxy to use for the HTTP connection.Optional<com.palantir.conjure.java.api.config.service.BasicCredentials> The credentials to use for the proxy selected byproxy().SeePartialServiceConfiguration.readTimeout().Indicates whether requests that resulted in a socket exception should be retried.Indicates whether timed out requests should be retried.Indicates whether QosExceptions (other than RetryOther) should be propagated.SeePartialServiceConfiguration.security().com.palantir.tritium.metrics.registry.TaggedMetricRegistryBoth per-request and global metrics are recorded in this registry.SeePartialServiceConfiguration.security().uris()SeePartialServiceConfiguration.uris().Optional<com.palantir.conjure.java.api.config.service.UserAgent> An identifier to distinguish this caller in the request logs of upstream services.SeePartialServiceConfiguration.writeTimeout().
-
Method Details
-
sslSocketFactory
SSLSocketFactory sslSocketFactory()SeePartialServiceConfiguration.security(). -
trustManager
X509TrustManager trustManager()SeePartialServiceConfiguration.security(). -
uris
-
connectTimeout
Duration connectTimeout()SeePartialServiceConfiguration.connectTimeout(). -
readTimeout
Duration readTimeout()SeePartialServiceConfiguration.readTimeout(). -
writeTimeout
Duration writeTimeout()SeePartialServiceConfiguration.writeTimeout(). -
enableGcmCipherSuites
boolean enableGcmCipherSuites()SeePartialServiceConfiguration.enableGcmCipherSuites(). -
enableHttp2
-
fallbackToCommonNameVerification
boolean fallbackToCommonNameVerification()SeePartialServiceConfiguration.fallbackToCommonNameVerification(). -
proxy
ProxySelector proxy()The proxy to use for the HTTP connection. -
proxyCredentials
-
meshProxy
Optional<com.google.common.net.HostAndPort> meshProxy()Clients configured with a mesh proxy send all HTTP requests to the configured proxy address instead of the configureduri; requests carry an additionalHostheader (or http/2:authoritypseudo-header) set to the configureduri. The proxy is expected to forward such requests to the original#uris uri.Note that if this option is set, then the
maxNumRetries()must also be set to 0 and exactly oneuris()must exist since the mesh proxy is expected to handle all retry logic. -
maxNumRetries
int maxNumRetries()The maximum number of times a failed request is retried. -
nodeSelectionStrategy
NodeSelectionStrategy nodeSelectionStrategy()Indicates how the target node is selected for a given request. -
failedUrlCooldown
Duration failedUrlCooldown()The amount of time a URL marked as failed should be avoided for subsequent calls. If thenodeSelectionStrategy()is ROUND_ROBIN, this must be a positive period of time. -
backoffSlotSize
Duration backoffSlotSize()The size of one backoff time slot for call retries. For example, an exponential backoff retry algorithm may choose a backoff time in[0, backoffSlotSize * 2^c]for the c-th retry. -
clientQoS
ClientConfiguration.ClientQoS clientQoS()Indicates whether client-side sympathetic QoS should be enabled. -
serverQoS
ClientConfiguration.ServerQoS serverQoS()Indicates whether QosExceptions (other than RetryOther) should be propagated. -
retryOnTimeout
ClientConfiguration.RetryOnTimeout retryOnTimeout()Indicates whether timed out requests should be retried. -
retryOnSocketException
ClientConfiguration.RetryOnSocketException retryOnSocketException()Indicates whether requests that resulted in a socket exception should be retried. -
taggedMetricRegistry
com.palantir.tritium.metrics.registry.TaggedMetricRegistry taggedMetricRegistry()Both per-request and global metrics are recorded in this registry. -
userAgent
Optional<com.palantir.conjure.java.api.config.service.UserAgent> userAgent()An identifier to distinguish this caller in the request logs of upstream services. -
hostEventsSink
Optional<HostEventsSink> hostEventsSink()Per-host failures are recorded using this interface. -
check
@Check default void check() -
builder
-