Package io.grpc.serviceconfig
Class ServiceConfig
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- io.grpc.serviceconfig.ServiceConfig
-
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,ServiceConfigOrBuilder,Serializable
public final class ServiceConfig extends com.google.protobuf.GeneratedMessageV3 implements ServiceConfigOrBuilder
A ServiceConfig represents information about a service but is not specific to any name resolver.
Protobuf typegrpc.service_config.ServiceConfig- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classServiceConfig.BuilderA ServiceConfig represents information about a service but is not specific to any name resolver.static classServiceConfig.HealthCheckConfigProtobuf typegrpc.service_config.ServiceConfig.HealthCheckConfigstatic interfaceServiceConfig.HealthCheckConfigOrBuilderstatic classServiceConfig.LoadBalancingPolicyLoad balancing policy.static classServiceConfig.RetryThrottlingPolicyIf a RetryThrottlingPolicy is provided, gRPC will automatically throttle retry attempts and hedged RPCs when the client's ratio of failures to successes exceeds a threshold.static interfaceServiceConfig.RetryThrottlingPolicyOrBuilder-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intHEALTH_CHECK_CONFIG_FIELD_NUMBERstatic intLOAD_BALANCING_CONFIG_FIELD_NUMBERstatic intLOAD_BALANCING_POLICY_FIELD_NUMBERstatic intMETHOD_CONFIG_FIELD_NUMBERstatic intRETRY_THROTTLING_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object obj)static ServiceConfiggetDefaultInstance()ServiceConfiggetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()ServiceConfig.HealthCheckConfiggetHealthCheckConfig().grpc.service_config.ServiceConfig.HealthCheckConfig health_check_config = 5;ServiceConfig.HealthCheckConfigOrBuildergetHealthCheckConfigOrBuilder().grpc.service_config.ServiceConfig.HealthCheckConfig health_check_config = 5;LoadBalancingConfiggetLoadBalancingConfig(int index)Multiple LB policies can be specified; clients will iterate through the list in order and stop at the first policy that they support.intgetLoadBalancingConfigCount()Multiple LB policies can be specified; clients will iterate through the list in order and stop at the first policy that they support.List<LoadBalancingConfig>getLoadBalancingConfigList()Multiple LB policies can be specified; clients will iterate through the list in order and stop at the first policy that they support.LoadBalancingConfigOrBuildergetLoadBalancingConfigOrBuilder(int index)Multiple LB policies can be specified; clients will iterate through the list in order and stop at the first policy that they support.List<? extends LoadBalancingConfigOrBuilder>getLoadBalancingConfigOrBuilderList()Multiple LB policies can be specified; clients will iterate through the list in order and stop at the first policy that they support.ServiceConfig.LoadBalancingPolicygetLoadBalancingPolicy()Deprecated.grpc.service_config.ServiceConfig.load_balancing_policy is deprecated.intgetLoadBalancingPolicyValue()Deprecated.grpc.service_config.ServiceConfig.load_balancing_policy is deprecated.MethodConfiggetMethodConfig(int index)Per-method configuration.intgetMethodConfigCount()Per-method configuration.List<MethodConfig>getMethodConfigList()Per-method configuration.MethodConfigOrBuildergetMethodConfigOrBuilder(int index)Per-method configuration.List<? extends MethodConfigOrBuilder>getMethodConfigOrBuilderList()Per-method configuration.com.google.protobuf.Parser<ServiceConfig>getParserForType()ServiceConfig.RetryThrottlingPolicygetRetryThrottling().grpc.service_config.ServiceConfig.RetryThrottlingPolicy retry_throttling = 3;ServiceConfig.RetryThrottlingPolicyOrBuildergetRetryThrottlingOrBuilder().grpc.service_config.ServiceConfig.RetryThrottlingPolicy retry_throttling = 3;intgetSerializedSize()com.google.protobuf.UnknownFieldSetgetUnknownFields()inthashCode()booleanhasHealthCheckConfig().grpc.service_config.ServiceConfig.HealthCheckConfig health_check_config = 5;booleanhasRetryThrottling().grpc.service_config.ServiceConfig.RetryThrottlingPolicy retry_throttling = 3;protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static ServiceConfig.BuildernewBuilder()static ServiceConfig.BuildernewBuilder(ServiceConfig prototype)ServiceConfig.BuildernewBuilderForType()protected ServiceConfig.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static ServiceConfigparseDelimitedFrom(InputStream input)static ServiceConfigparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ServiceConfigparseFrom(byte[] data)static ServiceConfigparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ServiceConfigparseFrom(com.google.protobuf.ByteString data)static ServiceConfigparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ServiceConfigparseFrom(com.google.protobuf.CodedInputStream input)static ServiceConfigparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ServiceConfigparseFrom(InputStream input)static ServiceConfigparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ServiceConfigparseFrom(ByteBuffer data)static ServiceConfigparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<ServiceConfig>parser()ServiceConfig.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
LOAD_BALANCING_POLICY_FIELD_NUMBER
public static final int LOAD_BALANCING_POLICY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LOAD_BALANCING_CONFIG_FIELD_NUMBER
public static final int LOAD_BALANCING_CONFIG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
METHOD_CONFIG_FIELD_NUMBER
public static final int METHOD_CONFIG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RETRY_THROTTLING_FIELD_NUMBER
public static final int RETRY_THROTTLING_FIELD_NUMBER
- See Also:
- Constant Field Values
-
HEALTH_CHECK_CONFIG_FIELD_NUMBER
public static final int HEALTH_CHECK_CONFIG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getLoadBalancingPolicyValue
@Deprecated public int getLoadBalancingPolicyValue()
Deprecated.grpc.service_config.ServiceConfig.load_balancing_policy is deprecated. See service_config.proto;l=548.grpc.service_config.ServiceConfig.LoadBalancingPolicy load_balancing_policy = 1 [deprecated = true];- Specified by:
getLoadBalancingPolicyValuein interfaceServiceConfigOrBuilder- Returns:
- The enum numeric value on the wire for loadBalancingPolicy.
-
getLoadBalancingPolicy
@Deprecated public ServiceConfig.LoadBalancingPolicy getLoadBalancingPolicy()
Deprecated.grpc.service_config.ServiceConfig.load_balancing_policy is deprecated. See service_config.proto;l=548.grpc.service_config.ServiceConfig.LoadBalancingPolicy load_balancing_policy = 1 [deprecated = true];- Specified by:
getLoadBalancingPolicyin interfaceServiceConfigOrBuilder- Returns:
- The loadBalancingPolicy.
-
getLoadBalancingConfigList
public List<LoadBalancingConfig> getLoadBalancingConfigList()
Multiple LB policies can be specified; clients will iterate through the list in order and stop at the first policy that they support. If none are supported, the service config is considered invalid.
repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;- Specified by:
getLoadBalancingConfigListin interfaceServiceConfigOrBuilder
-
getLoadBalancingConfigOrBuilderList
public List<? extends LoadBalancingConfigOrBuilder> getLoadBalancingConfigOrBuilderList()
Multiple LB policies can be specified; clients will iterate through the list in order and stop at the first policy that they support. If none are supported, the service config is considered invalid.
repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;- Specified by:
getLoadBalancingConfigOrBuilderListin interfaceServiceConfigOrBuilder
-
getLoadBalancingConfigCount
public int getLoadBalancingConfigCount()
Multiple LB policies can be specified; clients will iterate through the list in order and stop at the first policy that they support. If none are supported, the service config is considered invalid.
repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;- Specified by:
getLoadBalancingConfigCountin interfaceServiceConfigOrBuilder
-
getLoadBalancingConfig
public LoadBalancingConfig getLoadBalancingConfig(int index)
Multiple LB policies can be specified; clients will iterate through the list in order and stop at the first policy that they support. If none are supported, the service config is considered invalid.
repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;- Specified by:
getLoadBalancingConfigin interfaceServiceConfigOrBuilder
-
getLoadBalancingConfigOrBuilder
public LoadBalancingConfigOrBuilder getLoadBalancingConfigOrBuilder(int index)
Multiple LB policies can be specified; clients will iterate through the list in order and stop at the first policy that they support. If none are supported, the service config is considered invalid.
repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;- Specified by:
getLoadBalancingConfigOrBuilderin interfaceServiceConfigOrBuilder
-
getMethodConfigList
public List<MethodConfig> getMethodConfigList()
Per-method configuration.
repeated .grpc.service_config.MethodConfig method_config = 2;- Specified by:
getMethodConfigListin interfaceServiceConfigOrBuilder
-
getMethodConfigOrBuilderList
public List<? extends MethodConfigOrBuilder> getMethodConfigOrBuilderList()
Per-method configuration.
repeated .grpc.service_config.MethodConfig method_config = 2;- Specified by:
getMethodConfigOrBuilderListin interfaceServiceConfigOrBuilder
-
getMethodConfigCount
public int getMethodConfigCount()
Per-method configuration.
repeated .grpc.service_config.MethodConfig method_config = 2;- Specified by:
getMethodConfigCountin interfaceServiceConfigOrBuilder
-
getMethodConfig
public MethodConfig getMethodConfig(int index)
Per-method configuration.
repeated .grpc.service_config.MethodConfig method_config = 2;- Specified by:
getMethodConfigin interfaceServiceConfigOrBuilder
-
getMethodConfigOrBuilder
public MethodConfigOrBuilder getMethodConfigOrBuilder(int index)
Per-method configuration.
repeated .grpc.service_config.MethodConfig method_config = 2;- Specified by:
getMethodConfigOrBuilderin interfaceServiceConfigOrBuilder
-
hasRetryThrottling
public boolean hasRetryThrottling()
.grpc.service_config.ServiceConfig.RetryThrottlingPolicy retry_throttling = 3;- Specified by:
hasRetryThrottlingin interfaceServiceConfigOrBuilder- Returns:
- Whether the retryThrottling field is set.
-
getRetryThrottling
public ServiceConfig.RetryThrottlingPolicy getRetryThrottling()
.grpc.service_config.ServiceConfig.RetryThrottlingPolicy retry_throttling = 3;- Specified by:
getRetryThrottlingin interfaceServiceConfigOrBuilder- Returns:
- The retryThrottling.
-
getRetryThrottlingOrBuilder
public ServiceConfig.RetryThrottlingPolicyOrBuilder getRetryThrottlingOrBuilder()
.grpc.service_config.ServiceConfig.RetryThrottlingPolicy retry_throttling = 3;- Specified by:
getRetryThrottlingOrBuilderin interfaceServiceConfigOrBuilder
-
hasHealthCheckConfig
public boolean hasHealthCheckConfig()
.grpc.service_config.ServiceConfig.HealthCheckConfig health_check_config = 5;- Specified by:
hasHealthCheckConfigin interfaceServiceConfigOrBuilder- Returns:
- Whether the healthCheckConfig field is set.
-
getHealthCheckConfig
public ServiceConfig.HealthCheckConfig getHealthCheckConfig()
.grpc.service_config.ServiceConfig.HealthCheckConfig health_check_config = 5;- Specified by:
getHealthCheckConfigin interfaceServiceConfigOrBuilder- Returns:
- The healthCheckConfig.
-
getHealthCheckConfigOrBuilder
public ServiceConfig.HealthCheckConfigOrBuilder getHealthCheckConfigOrBuilder()
.grpc.service_config.ServiceConfig.HealthCheckConfig health_check_config = 5;- Specified by:
getHealthCheckConfigOrBuilderin interfaceServiceConfigOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static ServiceConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceConfig parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceConfig parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static ServiceConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static ServiceConfig parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static ServiceConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static ServiceConfig parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static ServiceConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public ServiceConfig.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static ServiceConfig.Builder newBuilder()
-
newBuilder
public static ServiceConfig.Builder newBuilder(ServiceConfig prototype)
-
toBuilder
public ServiceConfig.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected ServiceConfig.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static ServiceConfig getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<ServiceConfig> parser()
-
getParserForType
public com.google.protobuf.Parser<ServiceConfig> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public ServiceConfig getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-