Back to index

munin  2.0.1
MultigraphThreads.java
Go to the documentation of this file.
00001 package org.munin.plugin.jmx;
00002 
00003 import java.util.LinkedHashMap;
00004 import java.util.Map;
00005 
00006 public class MultigraphThreads extends AbstractMultiGraphsProvider {
00007        private static final String PREFIX = "_threads";
00008 
00009        public MultigraphThreads(Config config) {
00010               super(config);
00011               // can't set the PREFIX itself, because we also need to use config
00012               // without that prefix for the legacy data storage graphs
00013               // setPrefix(getPrefix() + PREFIX);
00014        }
00015 
00016        @Override
00017        protected Map<String, AbstractGraphsProvider> getProviders() {
00018               Map<String, AbstractGraphsProvider> providers = new LinkedHashMap<String, AbstractGraphsProvider>();
00019               addWithAlias(providers, new Threads(config), "_Threads", PREFIX, PREFIX
00020                             + ".threads");
00021               providers.put(PREFIX + ".historical", new ThreadsHistorical(config));
00022               addWithAlias(providers, new ThreadsDeadlocked(config),
00023                             "_ThreadsDeadlocked", PREFIX + ".deadlocked");
00024               return providers;
00025        }
00026 
00027        public static void main(String[] args) {
00028               runGraph(args);
00029        }
00030 }