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