Package java.lang.management

Examples of java.lang.management.MemoryPoolMXBean


    Iterator beans = ManagementFactory.getMemoryPoolMXBeans().iterator();
    long aftergc = 0;
    long maxaftergc = 0;
   
    while (beans.hasNext()){
      MemoryPoolMXBean bean = (MemoryPoolMXBean) beans.next();
      String beanname = bean.getName();
     
      if(!beanname.toUpperCase().contains("OLD GEN")) continue;
     
      MemoryUsage mu = bean.getCollectionUsage();
     
      if(mu == null) continue;
     
      aftergc = mu.getUsed();
     
View Full Code Here


       
    protected MeasurableMonitor<MemoryPoolUtilization> createMeasurableMonitor(String id) {
        MemoryPoolMXBeanMonitor m = new MemoryPoolMXBeanMonitor();
        m.setID(id);
        m.setThresholdValues(getThresholdValues());
        MemoryPoolMXBean memoryBean = m.getMemoryPoolMXBean();
        if(memoryBean==null)
            m = null;
        return m;

    }
View Full Code Here

TOP

Related Classes of java.lang.management.MemoryPoolMXBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.