1 23 24 package org.continuent.sequoia.common.jmx.monitoring.controller; 25 26 import org.continuent.sequoia.common.i18n.Translate; 27 28 34 public class UsedMemoryCollector extends AbstractControllerDataCollector 35 { 36 37 private static final long serialVersionUID = -3948548986150527407L; 38 39 42 public long collectValue() 43 { 44 return (Runtime.getRuntime().totalMemory() - Runtime.getRuntime() 45 .freeMemory()) / 1024 / 1024; 46 } 47 48 51 public String getDescription() 52 { 53 return Translate.get("monitoring.controller.used.memory"); } 55 56 61 public UsedMemoryCollector(Object controller) 62 { 63 super(controller); 64 } 65 } 66 | Popular Tags |