Class ClusterStats.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, ClusterStatsOrBuilder, java.lang.Cloneable
    Enclosing class:
    ClusterStats

    public static final class ClusterStats.Builder
    extends com.google.protobuf.GeneratedMessage.Builder<ClusterStats.Builder>
    implements ClusterStatsOrBuilder
     Per cluster load stats. Envoy reports these stats a management server in a
     :ref:`LoadStatsRequest<envoy_v3_api_msg_service.load_stats.v3.LoadStatsRequest>`
     Next ID: 7
     [#next-free-field: 7]
     
    Protobuf type envoy.config.endpoint.v3.ClusterStats
    • Constructor Detail

      • Builder

        private Builder()
      • Builder

        private Builder​(com.google.protobuf.AbstractMessage.BuilderParent parent)
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ClusterStats.Builder>
      • maybeForceBuilderInitialization

        private void maybeForceBuilderInitialization()
      • clear

        public ClusterStats.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessage.Builder<ClusterStats.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.GeneratedMessage.Builder<ClusterStats.Builder>
      • getDefaultInstanceForType

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

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

        public ClusterStats buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • buildPartialRepeatedFields

        private void buildPartialRepeatedFields​(ClusterStats result)
      • buildPartial0

        private void buildPartial0​(ClusterStats result)
      • mergeFrom

        public ClusterStats.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ClusterStats.Builder>
      • isInitialized

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

        public ClusterStats.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws java.io.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<ClusterStats.Builder>
        Throws:
        java.io.IOException
      • getClusterName

        public java.lang.String getClusterName()
         The name of the cluster.
         
        string cluster_name = 1 [(.validate.rules) = { ... }
        Specified by:
        getClusterName in interface ClusterStatsOrBuilder
        Returns:
        The clusterName.
      • getClusterNameBytes

        public com.google.protobuf.ByteString getClusterNameBytes()
         The name of the cluster.
         
        string cluster_name = 1 [(.validate.rules) = { ... }
        Specified by:
        getClusterNameBytes in interface ClusterStatsOrBuilder
        Returns:
        The bytes for clusterName.
      • setClusterName

        public ClusterStats.Builder setClusterName​(java.lang.String value)
         The name of the cluster.
         
        string cluster_name = 1 [(.validate.rules) = { ... }
        Parameters:
        value - The clusterName to set.
        Returns:
        This builder for chaining.
      • clearClusterName

        public ClusterStats.Builder clearClusterName()
         The name of the cluster.
         
        string cluster_name = 1 [(.validate.rules) = { ... }
        Returns:
        This builder for chaining.
      • setClusterNameBytes

        public ClusterStats.Builder setClusterNameBytes​(com.google.protobuf.ByteString value)
         The name of the cluster.
         
        string cluster_name = 1 [(.validate.rules) = { ... }
        Parameters:
        value - The bytes for clusterName to set.
        Returns:
        This builder for chaining.
      • getClusterServiceName

        public java.lang.String getClusterServiceName()
         The eds_cluster_config service_name of the cluster.
         It's possible that two clusters send the same service_name to EDS,
         in that case, the management server is supposed to do aggregation on the load reports.
         
        string cluster_service_name = 6;
        Specified by:
        getClusterServiceName in interface ClusterStatsOrBuilder
        Returns:
        The clusterServiceName.
      • getClusterServiceNameBytes

        public com.google.protobuf.ByteString getClusterServiceNameBytes()
         The eds_cluster_config service_name of the cluster.
         It's possible that two clusters send the same service_name to EDS,
         in that case, the management server is supposed to do aggregation on the load reports.
         
        string cluster_service_name = 6;
        Specified by:
        getClusterServiceNameBytes in interface ClusterStatsOrBuilder
        Returns:
        The bytes for clusterServiceName.
      • setClusterServiceName

        public ClusterStats.Builder setClusterServiceName​(java.lang.String value)
         The eds_cluster_config service_name of the cluster.
         It's possible that two clusters send the same service_name to EDS,
         in that case, the management server is supposed to do aggregation on the load reports.
         
        string cluster_service_name = 6;
        Parameters:
        value - The clusterServiceName to set.
        Returns:
        This builder for chaining.
      • clearClusterServiceName

        public ClusterStats.Builder clearClusterServiceName()
         The eds_cluster_config service_name of the cluster.
         It's possible that two clusters send the same service_name to EDS,
         in that case, the management server is supposed to do aggregation on the load reports.
         
        string cluster_service_name = 6;
        Returns:
        This builder for chaining.
      • setClusterServiceNameBytes

        public ClusterStats.Builder setClusterServiceNameBytes​(com.google.protobuf.ByteString value)
         The eds_cluster_config service_name of the cluster.
         It's possible that two clusters send the same service_name to EDS,
         in that case, the management server is supposed to do aggregation on the load reports.
         
        string cluster_service_name = 6;
        Parameters:
        value - The bytes for clusterServiceName to set.
        Returns:
        This builder for chaining.
      • ensureUpstreamLocalityStatsIsMutable

        private void ensureUpstreamLocalityStatsIsMutable()
      • getUpstreamLocalityStatsCount

        public int getUpstreamLocalityStatsCount()
         Need at least one.
         
        repeated .envoy.config.endpoint.v3.UpstreamLocalityStats upstream_locality_stats = 2 [(.validate.rules) = { ... }
        Specified by:
        getUpstreamLocalityStatsCount in interface ClusterStatsOrBuilder
      • setUpstreamLocalityStats

        public ClusterStats.Builder setUpstreamLocalityStats​(int index,
                                                             UpstreamLocalityStats value)
         Need at least one.
         
        repeated .envoy.config.endpoint.v3.UpstreamLocalityStats upstream_locality_stats = 2 [(.validate.rules) = { ... }
      • setUpstreamLocalityStats

        public ClusterStats.Builder setUpstreamLocalityStats​(int index,
                                                             UpstreamLocalityStats.Builder builderForValue)
         Need at least one.
         
        repeated .envoy.config.endpoint.v3.UpstreamLocalityStats upstream_locality_stats = 2 [(.validate.rules) = { ... }
      • addUpstreamLocalityStats

        public ClusterStats.Builder addUpstreamLocalityStats​(UpstreamLocalityStats value)
         Need at least one.
         
        repeated .envoy.config.endpoint.v3.UpstreamLocalityStats upstream_locality_stats = 2 [(.validate.rules) = { ... }
      • addUpstreamLocalityStats

        public ClusterStats.Builder addUpstreamLocalityStats​(int index,
                                                             UpstreamLocalityStats value)
         Need at least one.
         
        repeated .envoy.config.endpoint.v3.UpstreamLocalityStats upstream_locality_stats = 2 [(.validate.rules) = { ... }
      • addUpstreamLocalityStats

        public ClusterStats.Builder addUpstreamLocalityStats​(UpstreamLocalityStats.Builder builderForValue)
         Need at least one.
         
        repeated .envoy.config.endpoint.v3.UpstreamLocalityStats upstream_locality_stats = 2 [(.validate.rules) = { ... }
      • addUpstreamLocalityStats

        public ClusterStats.Builder addUpstreamLocalityStats​(int index,
                                                             UpstreamLocalityStats.Builder builderForValue)
         Need at least one.
         
        repeated .envoy.config.endpoint.v3.UpstreamLocalityStats upstream_locality_stats = 2 [(.validate.rules) = { ... }
      • addAllUpstreamLocalityStats

        public ClusterStats.Builder addAllUpstreamLocalityStats​(java.lang.Iterable<? extends UpstreamLocalityStats> values)
         Need at least one.
         
        repeated .envoy.config.endpoint.v3.UpstreamLocalityStats upstream_locality_stats = 2 [(.validate.rules) = { ... }
      • clearUpstreamLocalityStats

        public ClusterStats.Builder clearUpstreamLocalityStats()
         Need at least one.
         
        repeated .envoy.config.endpoint.v3.UpstreamLocalityStats upstream_locality_stats = 2 [(.validate.rules) = { ... }
      • removeUpstreamLocalityStats

        public ClusterStats.Builder removeUpstreamLocalityStats​(int index)
         Need at least one.
         
        repeated .envoy.config.endpoint.v3.UpstreamLocalityStats upstream_locality_stats = 2 [(.validate.rules) = { ... }
      • getUpstreamLocalityStatsBuilder

        public UpstreamLocalityStats.Builder getUpstreamLocalityStatsBuilder​(int index)
         Need at least one.
         
        repeated .envoy.config.endpoint.v3.UpstreamLocalityStats upstream_locality_stats = 2 [(.validate.rules) = { ... }
      • addUpstreamLocalityStatsBuilder

        public UpstreamLocalityStats.Builder addUpstreamLocalityStatsBuilder()
         Need at least one.
         
        repeated .envoy.config.endpoint.v3.UpstreamLocalityStats upstream_locality_stats = 2 [(.validate.rules) = { ... }
      • addUpstreamLocalityStatsBuilder

        public UpstreamLocalityStats.Builder addUpstreamLocalityStatsBuilder​(int index)
         Need at least one.
         
        repeated .envoy.config.endpoint.v3.UpstreamLocalityStats upstream_locality_stats = 2 [(.validate.rules) = { ... }
      • getUpstreamLocalityStatsBuilderList

        public java.util.List<UpstreamLocalityStats.Builder> getUpstreamLocalityStatsBuilderList()
         Need at least one.
         
        repeated .envoy.config.endpoint.v3.UpstreamLocalityStats upstream_locality_stats = 2 [(.validate.rules) = { ... }
      • getTotalDroppedRequests

        public long getTotalDroppedRequests()
         Cluster-level stats such as total_successful_requests may be computed by
         summing upstream_locality_stats. In addition, below there are additional
         cluster-wide stats.
        
         The total number of dropped requests. This covers requests
         deliberately dropped by the drop_overload policy and circuit breaking.
         
        uint64 total_dropped_requests = 3;
        Specified by:
        getTotalDroppedRequests in interface ClusterStatsOrBuilder
        Returns:
        The totalDroppedRequests.
      • setTotalDroppedRequests

        public ClusterStats.Builder setTotalDroppedRequests​(long value)
         Cluster-level stats such as total_successful_requests may be computed by
         summing upstream_locality_stats. In addition, below there are additional
         cluster-wide stats.
        
         The total number of dropped requests. This covers requests
         deliberately dropped by the drop_overload policy and circuit breaking.
         
        uint64 total_dropped_requests = 3;
        Parameters:
        value - The totalDroppedRequests to set.
        Returns:
        This builder for chaining.
      • clearTotalDroppedRequests

        public ClusterStats.Builder clearTotalDroppedRequests()
         Cluster-level stats such as total_successful_requests may be computed by
         summing upstream_locality_stats. In addition, below there are additional
         cluster-wide stats.
        
         The total number of dropped requests. This covers requests
         deliberately dropped by the drop_overload policy and circuit breaking.
         
        uint64 total_dropped_requests = 3;
        Returns:
        This builder for chaining.
      • ensureDroppedRequestsIsMutable

        private void ensureDroppedRequestsIsMutable()
      • getDroppedRequestsList

        public java.util.List<ClusterStats.DroppedRequests> getDroppedRequestsList()
         Information about deliberately dropped requests for each category specified
         in the DropOverload policy.
         
        repeated .envoy.config.endpoint.v3.ClusterStats.DroppedRequests dropped_requests = 5;
        Specified by:
        getDroppedRequestsList in interface ClusterStatsOrBuilder
      • getDroppedRequestsCount

        public int getDroppedRequestsCount()
         Information about deliberately dropped requests for each category specified
         in the DropOverload policy.
         
        repeated .envoy.config.endpoint.v3.ClusterStats.DroppedRequests dropped_requests = 5;
        Specified by:
        getDroppedRequestsCount in interface ClusterStatsOrBuilder
      • getDroppedRequests

        public ClusterStats.DroppedRequests getDroppedRequests​(int index)
         Information about deliberately dropped requests for each category specified
         in the DropOverload policy.
         
        repeated .envoy.config.endpoint.v3.ClusterStats.DroppedRequests dropped_requests = 5;
        Specified by:
        getDroppedRequests in interface ClusterStatsOrBuilder
      • setDroppedRequests

        public ClusterStats.Builder setDroppedRequests​(int index,
                                                       ClusterStats.DroppedRequests value)
         Information about deliberately dropped requests for each category specified
         in the DropOverload policy.
         
        repeated .envoy.config.endpoint.v3.ClusterStats.DroppedRequests dropped_requests = 5;
      • setDroppedRequests

        public ClusterStats.Builder setDroppedRequests​(int index,
                                                       ClusterStats.DroppedRequests.Builder builderForValue)
         Information about deliberately dropped requests for each category specified
         in the DropOverload policy.
         
        repeated .envoy.config.endpoint.v3.ClusterStats.DroppedRequests dropped_requests = 5;
      • addDroppedRequests

        public ClusterStats.Builder addDroppedRequests​(ClusterStats.DroppedRequests value)
         Information about deliberately dropped requests for each category specified
         in the DropOverload policy.
         
        repeated .envoy.config.endpoint.v3.ClusterStats.DroppedRequests dropped_requests = 5;
      • addDroppedRequests

        public ClusterStats.Builder addDroppedRequests​(int index,
                                                       ClusterStats.DroppedRequests value)
         Information about deliberately dropped requests for each category specified
         in the DropOverload policy.
         
        repeated .envoy.config.endpoint.v3.ClusterStats.DroppedRequests dropped_requests = 5;
      • addDroppedRequests

        public ClusterStats.Builder addDroppedRequests​(ClusterStats.DroppedRequests.Builder builderForValue)
         Information about deliberately dropped requests for each category specified
         in the DropOverload policy.
         
        repeated .envoy.config.endpoint.v3.ClusterStats.DroppedRequests dropped_requests = 5;
      • addDroppedRequests

        public ClusterStats.Builder addDroppedRequests​(int index,
                                                       ClusterStats.DroppedRequests.Builder builderForValue)
         Information about deliberately dropped requests for each category specified
         in the DropOverload policy.
         
        repeated .envoy.config.endpoint.v3.ClusterStats.DroppedRequests dropped_requests = 5;
      • addAllDroppedRequests

        public ClusterStats.Builder addAllDroppedRequests​(java.lang.Iterable<? extends ClusterStats.DroppedRequests> values)
         Information about deliberately dropped requests for each category specified
         in the DropOverload policy.
         
        repeated .envoy.config.endpoint.v3.ClusterStats.DroppedRequests dropped_requests = 5;
      • clearDroppedRequests

        public ClusterStats.Builder clearDroppedRequests()
         Information about deliberately dropped requests for each category specified
         in the DropOverload policy.
         
        repeated .envoy.config.endpoint.v3.ClusterStats.DroppedRequests dropped_requests = 5;
      • removeDroppedRequests

        public ClusterStats.Builder removeDroppedRequests​(int index)
         Information about deliberately dropped requests for each category specified
         in the DropOverload policy.
         
        repeated .envoy.config.endpoint.v3.ClusterStats.DroppedRequests dropped_requests = 5;
      • getDroppedRequestsBuilder

        public ClusterStats.DroppedRequests.Builder getDroppedRequestsBuilder​(int index)
         Information about deliberately dropped requests for each category specified
         in the DropOverload policy.
         
        repeated .envoy.config.endpoint.v3.ClusterStats.DroppedRequests dropped_requests = 5;
      • addDroppedRequestsBuilder

        public ClusterStats.DroppedRequests.Builder addDroppedRequestsBuilder()
         Information about deliberately dropped requests for each category specified
         in the DropOverload policy.
         
        repeated .envoy.config.endpoint.v3.ClusterStats.DroppedRequests dropped_requests = 5;
      • addDroppedRequestsBuilder

        public ClusterStats.DroppedRequests.Builder addDroppedRequestsBuilder​(int index)
         Information about deliberately dropped requests for each category specified
         in the DropOverload policy.
         
        repeated .envoy.config.endpoint.v3.ClusterStats.DroppedRequests dropped_requests = 5;
      • getDroppedRequestsBuilderList

        public java.util.List<ClusterStats.DroppedRequests.Builder> getDroppedRequestsBuilderList()
         Information about deliberately dropped requests for each category specified
         in the DropOverload policy.
         
        repeated .envoy.config.endpoint.v3.ClusterStats.DroppedRequests dropped_requests = 5;
      • hasLoadReportInterval

        public boolean hasLoadReportInterval()
         Period over which the actual load report occurred. This will be guaranteed to include every
         request reported. Due to system load and delays between the ``LoadStatsRequest`` sent from Envoy
         and the ``LoadStatsResponse`` message sent from the management server, this may be longer than
         the requested load reporting interval in the ``LoadStatsResponse``.
         
        .google.protobuf.Duration load_report_interval = 4;
        Specified by:
        hasLoadReportInterval in interface ClusterStatsOrBuilder
        Returns:
        Whether the loadReportInterval field is set.
      • getLoadReportInterval

        public com.google.protobuf.Duration getLoadReportInterval()
         Period over which the actual load report occurred. This will be guaranteed to include every
         request reported. Due to system load and delays between the ``LoadStatsRequest`` sent from Envoy
         and the ``LoadStatsResponse`` message sent from the management server, this may be longer than
         the requested load reporting interval in the ``LoadStatsResponse``.
         
        .google.protobuf.Duration load_report_interval = 4;
        Specified by:
        getLoadReportInterval in interface ClusterStatsOrBuilder
        Returns:
        The loadReportInterval.
      • setLoadReportInterval

        public ClusterStats.Builder setLoadReportInterval​(com.google.protobuf.Duration value)
         Period over which the actual load report occurred. This will be guaranteed to include every
         request reported. Due to system load and delays between the ``LoadStatsRequest`` sent from Envoy
         and the ``LoadStatsResponse`` message sent from the management server, this may be longer than
         the requested load reporting interval in the ``LoadStatsResponse``.
         
        .google.protobuf.Duration load_report_interval = 4;
      • setLoadReportInterval

        public ClusterStats.Builder setLoadReportInterval​(com.google.protobuf.Duration.Builder builderForValue)
         Period over which the actual load report occurred. This will be guaranteed to include every
         request reported. Due to system load and delays between the ``LoadStatsRequest`` sent from Envoy
         and the ``LoadStatsResponse`` message sent from the management server, this may be longer than
         the requested load reporting interval in the ``LoadStatsResponse``.
         
        .google.protobuf.Duration load_report_interval = 4;
      • mergeLoadReportInterval

        public ClusterStats.Builder mergeLoadReportInterval​(com.google.protobuf.Duration value)
         Period over which the actual load report occurred. This will be guaranteed to include every
         request reported. Due to system load and delays between the ``LoadStatsRequest`` sent from Envoy
         and the ``LoadStatsResponse`` message sent from the management server, this may be longer than
         the requested load reporting interval in the ``LoadStatsResponse``.
         
        .google.protobuf.Duration load_report_interval = 4;
      • clearLoadReportInterval

        public ClusterStats.Builder clearLoadReportInterval()
         Period over which the actual load report occurred. This will be guaranteed to include every
         request reported. Due to system load and delays between the ``LoadStatsRequest`` sent from Envoy
         and the ``LoadStatsResponse`` message sent from the management server, this may be longer than
         the requested load reporting interval in the ``LoadStatsResponse``.
         
        .google.protobuf.Duration load_report_interval = 4;
      • getLoadReportIntervalBuilder

        public com.google.protobuf.Duration.Builder getLoadReportIntervalBuilder()
         Period over which the actual load report occurred. This will be guaranteed to include every
         request reported. Due to system load and delays between the ``LoadStatsRequest`` sent from Envoy
         and the ``LoadStatsResponse`` message sent from the management server, this may be longer than
         the requested load reporting interval in the ``LoadStatsResponse``.
         
        .google.protobuf.Duration load_report_interval = 4;
      • getLoadReportIntervalOrBuilder

        public com.google.protobuf.DurationOrBuilder getLoadReportIntervalOrBuilder()
         Period over which the actual load report occurred. This will be guaranteed to include every
         request reported. Due to system load and delays between the ``LoadStatsRequest`` sent from Envoy
         and the ``LoadStatsResponse`` message sent from the management server, this may be longer than
         the requested load reporting interval in the ``LoadStatsResponse``.
         
        .google.protobuf.Duration load_report_interval = 4;
        Specified by:
        getLoadReportIntervalOrBuilder in interface ClusterStatsOrBuilder
      • getLoadReportIntervalFieldBuilder

        private com.google.protobuf.SingleFieldBuilder<com.google.protobuf.Duration,​com.google.protobuf.Duration.Builder,​com.google.protobuf.DurationOrBuilder> getLoadReportIntervalFieldBuilder()
         Period over which the actual load report occurred. This will be guaranteed to include every
         request reported. Due to system load and delays between the ``LoadStatsRequest`` sent from Envoy
         and the ``LoadStatsResponse`` message sent from the management server, this may be longer than
         the requested load reporting interval in the ``LoadStatsResponse``.
         
        .google.protobuf.Duration load_report_interval = 4;