1 19 20 package org.netbeans.modules.java.source.util; 21 22 import javax.management.NotCompliantMBeanException ; 23 import javax.management.StandardMBean ; 24 25 29 public class LowMemoryNotifierMBeanImpl extends StandardMBean implements LowMemoryNotifierMBean { 30 31 public LowMemoryNotifierMBeanImpl () throws NotCompliantMBeanException { 32 super (LowMemoryNotifierMBean.class); 33 } 34 35 public void setMemoryTresholdLimit(float value) { 36 if (value <=0 || value>1) { 37 return; 38 } 39 LowMemoryNotifier.getDefault().setHeapLimit(value); 40 } 41 42 public float getMemoryTresholdLimit() { 43 return LowMemoryNotifier.getDefault().getHeapLimit(); 44 } 45 46 47 48 } 49 | Popular Tags |