private Map < ResourceType , MetricsTimeVaryingLong > createTypeToResourceCountMap ( Collection < ResourceType > resourceTypes , String actionType ) { Map < ResourceType , MetricsTimeVaryingLong > m = new HashMap < ResourceType , MetricsTimeVaryingLong > ( ) ; for ( ResourceType t : resourceTypes ) { String name = ( actionType + "_" + t ) . toLowerCase ( ) ; MetricsTimeVaryingLong value = new MetricsTimeVaryingLong ( name , registry ) ; m . put ( t , value ) ; } return m ; }
Create a map of resource type - > cumulative counts .