1 10 package mondrian.util; 11 12 20 public class FauxMemoryMonitor implements MemoryMonitor { 21 FauxMemoryMonitor() { 22 } 23 24 public boolean addListener(Listener listener, int thresholdPercentage) { 25 return true; 26 } 27 28 public boolean addListener(final Listener listener) { 29 return true; 30 } 31 32 public void updateListenerThreshold(Listener listener, int percentage) { 33 } 35 36 public boolean removeListener(Listener listener) { 37 return true; 38 } 39 public void removeAllListener() { 40 } 42 public long getMaxMemory() { 43 return Runtime.getRuntime().maxMemory(); 44 } 45 public long getUsedMemory() { 46 return Runtime.getRuntime().freeMemory(); 47 } 48 } 49 50 | Popular Tags |