Class LoadStatsManager2


  • @ThreadSafe
    @Internal
    public final class LoadStatsManager2
    extends java.lang.Object
    Manages client side traffic stats. Drop stats are maintained in cluster (with edsServiceName) granularity and load stats (request counts) are maintained in locality granularity.
    • Constructor Detail

      • LoadStatsManager2

        public LoadStatsManager2​(com.google.common.base.Supplier<com.google.common.base.Stopwatch> stopwatchSupplier)
    • Method Detail

      • getClusterDropStats

        public LoadStatsManager2.ClusterDropStats getClusterDropStats​(java.lang.String cluster,
                                                                      @Nullable
                                                                      java.lang.String edsServiceName)
        Gets or creates the stats object for recording drops for the specified cluster with edsServiceName. The returned object is reference counted and the caller should use LoadStatsManager2.ClusterDropStats.release() to release its hard reference when it is safe to discard future stats for the cluster.
      • releaseClusterDropCounter

        private void releaseClusterDropCounter​(java.lang.String cluster,
                                               @Nullable
                                               java.lang.String edsServiceName)
      • getClusterLocalityStats

        public LoadStatsManager2.ClusterLocalityStats getClusterLocalityStats​(java.lang.String cluster,
                                                                              @Nullable
                                                                              java.lang.String edsServiceName,
                                                                              Locality locality)
        Gets or creates the stats object for recording loads for the specified locality (in the specified cluster with edsServiceName). The returned object is reference counted and the caller should use LoadStatsManager2.ClusterLocalityStats.release() to release its hard reference when it is safe to discard the future stats for the locality.
      • releaseClusterLocalityLoadCounter

        private void releaseClusterLocalityLoadCounter​(java.lang.String cluster,
                                                       @Nullable
                                                       java.lang.String edsServiceName,
                                                       Locality locality)