private String constructMetricQueryKey ( Long startTimeStampBoundary , Metric metric , MetricQuery query ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( startTimeStampBoundary ) . append ( ":" ) ; sb . append ( query . getNamespace ( ) ) . append ( ":" ) ; sb . append ( query . getScope ( ) ) . append ( ":" ) ; sb . append ( query . getMetric ( ) ) . append ( ":" ) ; Map < String , String > treeMap = new TreeMap <> ( ) ; treeMap . putAll ( metric . getTags ( ) ) ; sb . append ( treeMap ) . append ( ":" ) ; sb . append ( query . getAggregator ( ) ) . append ( ":" ) ; sb . append ( query . getDownsampler ( ) ) . append ( ":" ) ; sb . append ( query . getDownsamplingPeriod ( ) ) ; return sb . toString ( ) ; }
Constructs a cache key from start time stamp boundary returned metric tags and metric query .