1 5 package org.exoplatform.container.monitor.jvm.v15; 6 7 8 import java.lang.management.ManagementFactory ; 9 import java.lang.management.MemoryMXBean ; 10 import java.lang.management.MemoryUsage ; 11 16 public class MemoryInfo { 17 private MemoryMXBean mxbean_ ; 18 19 public MemoryInfo() { 20 mxbean_ = ManagementFactory.getMemoryMXBean(); 21 } 22 23 public MemoryUsage getHeapMemoryUsage() { 24 return mxbean_.getHeapMemoryUsage() ; 25 } 26 27 public MemoryUsage getNonHeapMemoryUsage() { 28 return mxbean_.getNonHeapMemoryUsage() ; 29 } 30 31 public int getObjectPendingFinalizationCount() { 32 return mxbean_.getObjectPendingFinalizationCount() ; 33 } 34 35 public boolean isVerbose() { return mxbean_.isVerbose() ; } 36 37 } | Popular Tags |