1 package org.munin.plugin.jmx;
2 
3 import java.util.LinkedHashMap;
4 import java.util.Map;
5 
6 public class MultigraphThreads extends AbstractMultiGraphsProvider {
7 	private static final String PREFIX = "_threads";
8 
MultigraphThreads(Config config)9 	public MultigraphThreads(Config config) {
10 		super(config);
11 		// can't set the PREFIX itself, because we also need to use config
12 		// without that prefix for the legacy data storage graphs
13 		// setPrefix(getPrefix() + PREFIX);
14 	}
15 
16 	@Override
getProviders()17 	protected Map<String, AbstractGraphsProvider> getProviders() {
18 		Map<String, AbstractGraphsProvider> providers = new LinkedHashMap<String, AbstractGraphsProvider>();
19 		addWithAlias(providers, new Threads(config), "_Threads", PREFIX, PREFIX
20 				+ ".threads");
21 		providers.put(PREFIX + ".historical", new ThreadsHistorical(config));
22 		addWithAlias(providers, new ThreadsDeadlocked(config),
23 				"_ThreadsDeadlocked", PREFIX + ".deadlocked");
24 		return providers;
25 	}
26 
main(String[] args)27 	public static void main(String[] args) {
28 		runGraph(args);
29 	}
30 }
31