Class TcpProxy.WeightedCluster.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, TcpProxy.WeightedClusterOrBuilder, Cloneable
    Enclosing class:
    TcpProxy.WeightedCluster

    public static final class TcpProxy.WeightedCluster.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<TcpProxy.WeightedCluster.Builder>
    implements TcpProxy.WeightedClusterOrBuilder
     Allows for specification of multiple upstream clusters along with weights
     that indicate the percentage of traffic to be forwarded to each cluster.
     The router selects an upstream cluster based on these weights.
     
    Protobuf type envoy.config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster
    • Method Detail

      • 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.Builder<TcpProxy.WeightedCluster.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<TcpProxy.WeightedCluster.Builder>
      • getDefaultInstanceForType

        public TcpProxy.WeightedCluster getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public TcpProxy.WeightedCluster build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public TcpProxy.WeightedCluster buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • setRepeatedField

        public TcpProxy.WeightedCluster.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                 int index,
                                                                 Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TcpProxy.WeightedCluster.Builder>
      • addRepeatedField

        public TcpProxy.WeightedCluster.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                 Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TcpProxy.WeightedCluster.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<TcpProxy.WeightedCluster.Builder>
      • mergeFrom

        public TcpProxy.WeightedCluster.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                   throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TcpProxy.WeightedCluster.Builder>
        Throws:
        IOException
      • getClustersCount

        public int getClustersCount()
         Specifies one or more upstream clusters associated with the route.
         
        repeated .envoy.config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
        Specified by:
        getClustersCount in interface TcpProxy.WeightedClusterOrBuilder
      • clearClusters

        public TcpProxy.WeightedCluster.Builder clearClusters()
         Specifies one or more upstream clusters associated with the route.
         
        repeated .envoy.config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
      • removeClusters

        public TcpProxy.WeightedCluster.Builder removeClusters​(int index)
         Specifies one or more upstream clusters associated with the route.
         
        repeated .envoy.config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
      • getClustersBuilder

        public TcpProxy.WeightedCluster.ClusterWeight.Builder getClustersBuilder​(int index)
         Specifies one or more upstream clusters associated with the route.
         
        repeated .envoy.config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
      • addClustersBuilder

        public TcpProxy.WeightedCluster.ClusterWeight.Builder addClustersBuilder()
         Specifies one or more upstream clusters associated with the route.
         
        repeated .envoy.config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
      • addClustersBuilder

        public TcpProxy.WeightedCluster.ClusterWeight.Builder addClustersBuilder​(int index)
         Specifies one or more upstream clusters associated with the route.
         
        repeated .envoy.config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
      • getClustersBuilderList

        public List<TcpProxy.WeightedCluster.ClusterWeight.Builder> getClustersBuilderList()
         Specifies one or more upstream clusters associated with the route.
         
        repeated .envoy.config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster.ClusterWeight clusters = 1 [(.validate.rules) = { ... }
      • setUnknownFields

        public final TcpProxy.WeightedCluster.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TcpProxy.WeightedCluster.Builder>
      • mergeUnknownFields

        public final TcpProxy.WeightedCluster.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TcpProxy.WeightedCluster.Builder>