public class SystemMemoryUsageLoadMetric extends AbstractLoadMetric
LoadMetric
implementation that uses com.sun.management.OperatingSystemMXBean to determine system memory usage.Modifier and Type | Field and Description |
---|---|
static String |
FREE_MEMORY |
static String |
TOTAL_MEMORY |
DEFAULT_CAPACITY, DEFAULT_WEIGHT
Constructor and Description |
---|
SystemMemoryUsageLoadMetric() |
Modifier and Type | Method and Description |
---|---|
double |
getLoad(Engine engine)
Returns the current load of this metric as a percent of the metric's capacity.
|
void |
setMBeanServer(MBeanServer server) |
getCapacity, getWeight, setCapacity, setWeight
public static final String FREE_MEMORY
public static final String TOTAL_MEMORY
public void setMBeanServer(MBeanServer server)
public double getLoad(Engine engine) throws Exception
Exception
- if the load could not be determined.LoadMetric.getLoad(org.jboss.modcluster.container.Engine)
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.