Package io.grpc.xds.client
Class LoadStatsManager2.ClusterDropStats
- java.lang.Object
-
- io.grpc.xds.client.LoadStatsManager2.ClusterDropStats
-
- Enclosing class:
- LoadStatsManager2
@ThreadSafe public final class LoadStatsManager2.ClusterDropStats extends java.lang.ObjectRecorder for dropped requests. One instance per cluster with edsServiceName.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.ConcurrentMap<java.lang.String,java.util.concurrent.atomic.AtomicLong>categorizedDropsprivate java.lang.StringclusterNameprivate java.lang.StringedsServiceNameprivate com.google.common.base.Stopwatchstopwatchprivate java.util.concurrent.atomic.AtomicLonguncategorizedDrops
-
Constructor Summary
Constructors Modifier Constructor Description privateClusterDropStats(java.lang.String clusterName, java.lang.String edsServiceName, com.google.common.base.Stopwatch stopwatch)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrecordDroppedRequest()Records a dropped request without category.voidrecordDroppedRequest(java.lang.String category)Records a dropped request with the specified category.voidrelease()Release the hard reference for this stats object (previously obtained viaLoadStatsManager2.getClusterDropStats(java.lang.String, java.lang.String)).private LoadStatsManager2.ClusterDropStatsSnapshotsnapshot()
-
-
-
Field Detail
-
clusterName
private final java.lang.String clusterName
-
edsServiceName
@Nullable private final java.lang.String edsServiceName
-
uncategorizedDrops
private final java.util.concurrent.atomic.AtomicLong uncategorizedDrops
-
categorizedDrops
private final java.util.concurrent.ConcurrentMap<java.lang.String,java.util.concurrent.atomic.AtomicLong> categorizedDrops
-
stopwatch
private final com.google.common.base.Stopwatch stopwatch
-
-
Method Detail
-
recordDroppedRequest
public void recordDroppedRequest(java.lang.String category)
Records a dropped request with the specified category.
-
recordDroppedRequest
public void recordDroppedRequest()
Records a dropped request without category.
-
release
public void release()
Release the hard reference for this stats object (previously obtained viaLoadStatsManager2.getClusterDropStats(java.lang.String, java.lang.String)). The object may still be recording drops after this method, but there is no guarantee drops recorded after this point will be included in load reports.
-
snapshot
private LoadStatsManager2.ClusterDropStatsSnapshot snapshot()
-
-