Interface ReadResponseStatsRecorder

All Known Implementing Classes:
AbstractReadResponseStats, ComputeResponseStats, ComputeResponseStatsWithSizeProfiling, MultiGetResponseStatsWithSizeProfiling, MultiKeyResponseStats, SingleGetResponseStats

public interface ReadResponseStatsRecorder
This class is used to record stats associated with a read response. This container may hold two types of stats: Some stats are "mergeable", which means that we can aggregate multiple instances of ReadResponseStatsRecorder into one via merge(ReadResponseStatsRecorder), and call recordMetrics(ServerHttpRequestStats) onto the merged instance. Doing so achieves the same outcome as calling the recordMetrics(ServerHttpRequestStats) API on all individual instances, but from a performance standpoint, it may be preferable to do fewer calls to the stats object, since it needs to correctly handle high concurrency. Some other stats are not mergeable, and must be recorded individually. Those stats are not going to be merged when calling merge(ReadResponseStatsRecorder), and the code path which makes use of the merge is responsible for calling the recordUnmergedMetrics(ServerHttpRequestStats) API on the remaining objects.