Package io.grpc.internal
Class ManagedChannelServiceConfig
- java.lang.Object
-
- io.grpc.internal.ManagedChannelServiceConfig
-
final class ManagedChannelServiceConfig extends java.lang.Object
ManagedChannelServiceConfig
is a fully parsed and validated representation of service configuration data.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
ManagedChannelServiceConfig.MethodInfo
Equivalent of MethodConfig from a ServiceConfig with restrictions from Channel setting.(package private) static class
ManagedChannelServiceConfig.ServiceConfigConvertedSelector
-
Field Summary
Fields Modifier and Type Field Description private ManagedChannelServiceConfig.MethodInfo
defaultMethodConfig
private java.util.Map<java.lang.String,?>
healthCheckingConfig
private java.lang.Object
loadBalancingConfig
private RetriableStream.Throttle
retryThrottling
private java.util.Map<java.lang.String,ManagedChannelServiceConfig.MethodInfo>
serviceMap
private java.util.Map<java.lang.String,ManagedChannelServiceConfig.MethodInfo>
serviceMethodMap
-
Constructor Summary
Constructors Constructor Description ManagedChannelServiceConfig(ManagedChannelServiceConfig.MethodInfo defaultMethodConfig, java.util.Map<java.lang.String,ManagedChannelServiceConfig.MethodInfo> serviceMethodMap, java.util.Map<java.lang.String,ManagedChannelServiceConfig.MethodInfo> serviceMap, RetriableStream.Throttle retryThrottling, java.lang.Object loadBalancingConfig, java.util.Map<java.lang.String,?> healthCheckingConfig)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static ManagedChannelServiceConfig
empty()
Returns an emptyManagedChannelServiceConfig
.boolean
equals(java.lang.Object o)
(package private) static ManagedChannelServiceConfig
fromServiceConfig(java.util.Map<java.lang.String,?> serviceConfig, boolean retryEnabled, int maxRetryAttemptsLimit, int maxHedgedAttemptsLimit, java.lang.Object loadBalancingConfig)
Parses the Channel level config values (e.g.(package private) InternalConfigSelector
getDefaultConfigSelector()
Used as a fallback per-RPC config supplier when the attributes value ofInternalConfigSelector.KEY
is not available.(package private) java.util.Map<java.lang.String,?>
getHealthCheckingConfig()
(package private) java.lang.Object
getLoadBalancingConfig()
(package private) ManagedChannelServiceConfig.MethodInfo
getMethodConfig(MethodDescriptor<?,?> method)
(package private) RetriableStream.Throttle
getRetryThrottling()
int
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
defaultMethodConfig
@Nullable private final ManagedChannelServiceConfig.MethodInfo defaultMethodConfig
-
serviceMethodMap
private final java.util.Map<java.lang.String,ManagedChannelServiceConfig.MethodInfo> serviceMethodMap
-
serviceMap
private final java.util.Map<java.lang.String,ManagedChannelServiceConfig.MethodInfo> serviceMap
-
retryThrottling
@Nullable private final RetriableStream.Throttle retryThrottling
-
loadBalancingConfig
@Nullable private final java.lang.Object loadBalancingConfig
-
healthCheckingConfig
@Nullable private final java.util.Map<java.lang.String,?> healthCheckingConfig
-
-
Constructor Detail
-
ManagedChannelServiceConfig
ManagedChannelServiceConfig(@Nullable ManagedChannelServiceConfig.MethodInfo defaultMethodConfig, java.util.Map<java.lang.String,ManagedChannelServiceConfig.MethodInfo> serviceMethodMap, java.util.Map<java.lang.String,ManagedChannelServiceConfig.MethodInfo> serviceMap, @Nullable RetriableStream.Throttle retryThrottling, @Nullable java.lang.Object loadBalancingConfig, @Nullable java.util.Map<java.lang.String,?> healthCheckingConfig)
-
-
Method Detail
-
empty
static ManagedChannelServiceConfig empty()
Returns an emptyManagedChannelServiceConfig
.
-
fromServiceConfig
static ManagedChannelServiceConfig fromServiceConfig(java.util.Map<java.lang.String,?> serviceConfig, boolean retryEnabled, int maxRetryAttemptsLimit, int maxHedgedAttemptsLimit, @Nullable java.lang.Object loadBalancingConfig)
Parses the Channel level config values (e.g. excludes load balancing)
-
getHealthCheckingConfig
@Nullable java.util.Map<java.lang.String,?> getHealthCheckingConfig()
-
getDefaultConfigSelector
@Nullable InternalConfigSelector getDefaultConfigSelector()
Used as a fallback per-RPC config supplier when the attributes value ofInternalConfigSelector.KEY
is not available. Returnsnull
if there is no method config in this service config.
-
getLoadBalancingConfig
@Nullable java.lang.Object getLoadBalancingConfig()
-
getRetryThrottling
@Nullable RetriableStream.Throttle getRetryThrottling()
-
getMethodConfig
@Nullable ManagedChannelServiceConfig.MethodInfo getMethodConfig(MethodDescriptor<?,?> method)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-