private Map<ResourceType, MetricsIntValue> createTypeToCountMap(
      Collection<ResourceType> resourceTypes, String actionType) {
    Map<ResourceType, MetricsIntValue> m =
        new HashMap<ResourceType, MetricsIntValue>();
    for (ResourceType t : resourceTypes) {
      String name = (actionType + "_" + t).toLowerCase();
      MetricsIntValue value = new MetricsIntValue(name, registry);
      m.put(t, value);
    }
    return m;
  }
private Map < ResourceType , MetricsIntValue > createTypeToCountMap ( Collection < ResourceType > resourceTypes , String actionType ) { Map < ResourceType , MetricsIntValue > m = new HashMap < ResourceType , MetricsIntValue > ( ) ; for ( ResourceType t : resourceTypes ) { String name = ( actionType + "_" + t ) . toLowerCase ( ) ; MetricsIntValue value = new MetricsIntValue ( name , registry ) ; m . put ( t , value ) ; } return m ; }
Create a map of resource type -> current count.
@param resourceTypes The resource types.
@param actionType A string indicating pending, running etc.
@return The map.