Class LoadBalancingConfig

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, LoadBalancingConfigOrBuilder, Serializable

    public final class LoadBalancingConfig
    extends com.google.protobuf.GeneratedMessageV3
    implements LoadBalancingConfigOrBuilder
     Selects LB policy and provides corresponding configuration.
     In general, all instances of this field should be repeated. Clients will
     iterate through the list in order and stop at the first policy that they
     support.  This allows the service config to specify custom policies that may
     not be known to all clients.
     - If the config for the first supported policy is invalid, the whole service
       config is invalid.
     - If the list doesn't contain any supported policy, the whole service config
       is invalid.
     
    Protobuf type grpc.service_config.LoadBalancingConfig
    See Also:
    Serialized Form
    • Field Detail

      • PICK_FIRST_FIELD_NUMBER

        public static final int PICK_FIRST_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ROUND_ROBIN_FIELD_NUMBER

        public static final int ROUND_ROBIN_FIELD_NUMBER
        See Also:
        Constant Field Values
      • PRIORITY_EXPERIMENTAL_FIELD_NUMBER

        public static final int PRIORITY_EXPERIMENTAL_FIELD_NUMBER
        See Also:
        Constant Field Values
      • WEIGHTED_TARGET_EXPERIMENTAL_FIELD_NUMBER

        public static final int WEIGHTED_TARGET_EXPERIMENTAL_FIELD_NUMBER
        See Also:
        Constant Field Values
      • XDS_CLUSTER_MANAGER_EXPERIMENTAL_FIELD_NUMBER

        public static final int XDS_CLUSTER_MANAGER_EXPERIMENTAL_FIELD_NUMBER
        See Also:
        Constant Field Values
      • CDS_EXPERIMENTAL_FIELD_NUMBER

        public static final int CDS_EXPERIMENTAL_FIELD_NUMBER
        See Also:
        Constant Field Values
      • XDS_CLUSTER_RESOLVER_EXPERIMENTAL_FIELD_NUMBER

        public static final int XDS_CLUSTER_RESOLVER_EXPERIMENTAL_FIELD_NUMBER
        See Also:
        Constant Field Values
      • XDS_CLUSTER_IMPL_EXPERIMENTAL_FIELD_NUMBER

        public static final int XDS_CLUSTER_IMPL_EXPERIMENTAL_FIELD_NUMBER
        See Also:
        Constant Field Values
      • RING_HASH_EXPERIMENTAL_FIELD_NUMBER

        public static final int RING_HASH_EXPERIMENTAL_FIELD_NUMBER
        See Also:
        Constant Field Values
      • LRS_EXPERIMENTAL_FIELD_NUMBER

        public static final int LRS_EXPERIMENTAL_FIELD_NUMBER
        See Also:
        Constant Field Values
      • EDS_EXPERIMENTAL_FIELD_NUMBER

        public static final int EDS_EXPERIMENTAL_FIELD_NUMBER
        See Also:
        Constant Field Values
      • XDS_EXPERIMENTAL_FIELD_NUMBER

        public static final int XDS_EXPERIMENTAL_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • hasPickFirst

        public boolean hasPickFirst()
        .grpc.service_config.PickFirstConfig pick_first = 4 [json_name = "pick_first"];
        Specified by:
        hasPickFirst in interface LoadBalancingConfigOrBuilder
        Returns:
        Whether the pickFirst field is set.
      • hasRoundRobin

        public boolean hasRoundRobin()
        .grpc.service_config.RoundRobinConfig round_robin = 1 [json_name = "round_robin"];
        Specified by:
        hasRoundRobin in interface LoadBalancingConfigOrBuilder
        Returns:
        Whether the roundRobin field is set.
      • hasGrpclb

        public boolean hasGrpclb()
         gRPC lookaside load balancing.
         This will eventually be deprecated by the new xDS-based local
         balancing policy.
         
        .grpc.service_config.GrpcLbConfig grpclb = 3;
        Specified by:
        hasGrpclb in interface LoadBalancingConfigOrBuilder
        Returns:
        Whether the grpclb field is set.
      • getGrpclb

        public GrpcLbConfig getGrpclb()
         gRPC lookaside load balancing.
         This will eventually be deprecated by the new xDS-based local
         balancing policy.
         
        .grpc.service_config.GrpcLbConfig grpclb = 3;
        Specified by:
        getGrpclb in interface LoadBalancingConfigOrBuilder
        Returns:
        The grpclb.
      • hasPriorityExperimental

        public boolean hasPriorityExperimental()
        .grpc.service_config.PriorityLoadBalancingPolicyConfig priority_experimental = 9 [json_name = "priority_experimental"];
        Specified by:
        hasPriorityExperimental in interface LoadBalancingConfigOrBuilder
        Returns:
        Whether the priorityExperimental field is set.
      • hasWeightedTargetExperimental

        public boolean hasWeightedTargetExperimental()
        .grpc.service_config.WeightedTargetLoadBalancingPolicyConfig weighted_target_experimental = 10 [json_name = "weighted_target_experimental"];
        Specified by:
        hasWeightedTargetExperimental in interface LoadBalancingConfigOrBuilder
        Returns:
        Whether the weightedTargetExperimental field is set.
      • hasXdsClusterManagerExperimental

        public boolean hasXdsClusterManagerExperimental()
         xDS-based load balancing.
         
        .grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig xds_cluster_manager_experimental = 14 [json_name = "xds_cluster_manager_experimental"];
        Specified by:
        hasXdsClusterManagerExperimental in interface LoadBalancingConfigOrBuilder
        Returns:
        Whether the xdsClusterManagerExperimental field is set.
      • hasCdsExperimental

        public boolean hasCdsExperimental()
        .grpc.service_config.CdsConfig cds_experimental = 6 [json_name = "cds_experimental"];
        Specified by:
        hasCdsExperimental in interface LoadBalancingConfigOrBuilder
        Returns:
        Whether the cdsExperimental field is set.
      • hasXdsClusterResolverExperimental

        public boolean hasXdsClusterResolverExperimental()
        .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig xds_cluster_resolver_experimental = 11 [json_name = "xds_cluster_resolver_experimental"];
        Specified by:
        hasXdsClusterResolverExperimental in interface LoadBalancingConfigOrBuilder
        Returns:
        Whether the xdsClusterResolverExperimental field is set.
      • hasXdsClusterImplExperimental

        public boolean hasXdsClusterImplExperimental()
        .grpc.service_config.XdsClusterImplLoadBalancingPolicyConfig xds_cluster_impl_experimental = 12 [json_name = "xds_cluster_impl_experimental"];
        Specified by:
        hasXdsClusterImplExperimental in interface LoadBalancingConfigOrBuilder
        Returns:
        Whether the xdsClusterImplExperimental field is set.
      • hasRingHashExperimental

        public boolean hasRingHashExperimental()
        .grpc.service_config.RingHashLoadBalancingConfig ring_hash_experimental = 13 [json_name = "ring_hash_experimental"];
        Specified by:
        hasRingHashExperimental in interface LoadBalancingConfigOrBuilder
        Returns:
        Whether the ringHashExperimental field is set.
      • hasLrsExperimental

        @Deprecated
        public boolean hasLrsExperimental()
        Deprecated.
        grpc.service_config.LoadBalancingConfig.lrs_experimental is deprecated. See service_config.proto;l=511
         Deprecated xDS-related policies.
         
        .grpc.service_config.LrsLoadBalancingPolicyConfig lrs_experimental = 8 [json_name = "lrs_experimental", deprecated = true];
        Specified by:
        hasLrsExperimental in interface LoadBalancingConfigOrBuilder
        Returns:
        Whether the lrsExperimental field is set.
      • getLrsExperimental

        @Deprecated
        public LrsLoadBalancingPolicyConfig getLrsExperimental()
        Deprecated.
        grpc.service_config.LoadBalancingConfig.lrs_experimental is deprecated. See service_config.proto;l=511
         Deprecated xDS-related policies.
         
        .grpc.service_config.LrsLoadBalancingPolicyConfig lrs_experimental = 8 [json_name = "lrs_experimental", deprecated = true];
        Specified by:
        getLrsExperimental in interface LoadBalancingConfigOrBuilder
        Returns:
        The lrsExperimental.
      • hasEdsExperimental

        @Deprecated
        public boolean hasEdsExperimental()
        Deprecated.
        grpc.service_config.LoadBalancingConfig.eds_experimental is deprecated. See service_config.proto;l=513
        .grpc.service_config.EdsLoadBalancingPolicyConfig eds_experimental = 7 [json_name = "eds_experimental", deprecated = true];
        Specified by:
        hasEdsExperimental in interface LoadBalancingConfigOrBuilder
        Returns:
        Whether the edsExperimental field is set.
      • getEdsExperimental

        @Deprecated
        public EdsLoadBalancingPolicyConfig getEdsExperimental()
        Deprecated.
        grpc.service_config.LoadBalancingConfig.eds_experimental is deprecated. See service_config.proto;l=513
        .grpc.service_config.EdsLoadBalancingPolicyConfig eds_experimental = 7 [json_name = "eds_experimental", deprecated = true];
        Specified by:
        getEdsExperimental in interface LoadBalancingConfigOrBuilder
        Returns:
        The edsExperimental.
      • hasXds

        @Deprecated
        public boolean hasXds()
        Deprecated.
        grpc.service_config.LoadBalancingConfig.xds is deprecated. See service_config.proto;l=515
        .grpc.service_config.XdsConfig xds = 2 [deprecated = true];
        Specified by:
        hasXds in interface LoadBalancingConfigOrBuilder
        Returns:
        Whether the xds field is set.
      • getXds

        @Deprecated
        public XdsConfig getXds()
        Deprecated.
        grpc.service_config.LoadBalancingConfig.xds is deprecated. See service_config.proto;l=515
        .grpc.service_config.XdsConfig xds = 2 [deprecated = true];
        Specified by:
        getXds in interface LoadBalancingConfigOrBuilder
        Returns:
        The xds.
      • hasXdsExperimental

        @Deprecated
        public boolean hasXdsExperimental()
        Deprecated.
        grpc.service_config.LoadBalancingConfig.xds_experimental is deprecated. See service_config.proto;l=516
        .grpc.service_config.XdsConfig xds_experimental = 5 [json_name = "xds_experimental", deprecated = true];
        Specified by:
        hasXdsExperimental in interface LoadBalancingConfigOrBuilder
        Returns:
        Whether the xdsExperimental field is set.
      • getXdsExperimental

        @Deprecated
        public XdsConfig getXdsExperimental()
        Deprecated.
        grpc.service_config.LoadBalancingConfig.xds_experimental is deprecated. See service_config.proto;l=516
        .grpc.service_config.XdsConfig xds_experimental = 5 [json_name = "xds_experimental", deprecated = true];
        Specified by:
        getXdsExperimental in interface LoadBalancingConfigOrBuilder
        Returns:
        The xdsExperimental.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static LoadBalancingConfig parseFrom​(ByteBuffer data)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static LoadBalancingConfig parseFrom​(ByteBuffer data,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static LoadBalancingConfig parseFrom​(com.google.protobuf.ByteString data)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static LoadBalancingConfig parseFrom​(com.google.protobuf.ByteString data,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static LoadBalancingConfig parseFrom​(byte[] data)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static LoadBalancingConfig parseFrom​(byte[] data,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static LoadBalancingConfig parseFrom​(com.google.protobuf.CodedInputStream input,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws IOException
        Throws:
        IOException
      • newBuilderForType

        public LoadBalancingConfig.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public LoadBalancingConfig.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected LoadBalancingConfig.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<LoadBalancingConfig> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public LoadBalancingConfig getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder