Rio Project 4.2 API Documentation



org.rioproject.system.measurable.memory
Class SystemMemoryUtilization

java.lang.Object
  extended by org.rioproject.system.MeasuredResource
      extended by org.rioproject.system.measurable.memory.SystemMemoryUtilization
All Implemented Interfaces:
Serializable

public class SystemMemoryUtilization
extends MeasuredResource
implements Serializable

Measured system memory utilization

See Also:
Serialized Form

Constructor Summary
SystemMemoryUtilization(String identifier, double value, double total, double free, double used, double freePerc, double usedPerc, double ram, ThresholdValues tVals)
          Construct a SystemMemoryUtilization
SystemMemoryUtilization(String identifier, ThresholdValues tVals)
          Construct a SystemMemoryUtilization
 
Method Summary
 double getFree()
          Get the amount of free memory
 double getFreePercentage()
          Get the percentage of free memory
 double getRam()
          Get the amount of Random Access Memory (RAM) the system has
 double getTotal()
          Get the amount of total system memory
 double getUsed()
          Get the amount of used memory
 double getUsedPercentage()
          Get the percentage of used memory
 String toString()
           
 
Methods inherited from class org.rioproject.system.MeasuredResource
equals, evaluate, getIdentifier, getThresholdValues, getValue, hashCode, thresholdCrossed
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SystemMemoryUtilization

public SystemMemoryUtilization(String identifier,
                               ThresholdValues tVals)
Construct a SystemMemoryUtilization

Parameters:
identifier - Identifier for the SystemMemoryUtilization
tVals - ThresholdValues for the SystemMemoryUtilization

SystemMemoryUtilization

public SystemMemoryUtilization(String identifier,
                               double value,
                               double total,
                               double free,
                               double used,
                               double freePerc,
                               double usedPerc,
                               double ram,
                               ThresholdValues tVals)
Construct a SystemMemoryUtilization

Parameters:
identifier - Identifier for the SystemMemoryUtilization
value - The utilized system memory
total - The amount of total system memory in MB
free - The amount of free memory in MB
used - The amount of free memory in MB
freePerc - The percentage of free memory
usedPerc - The percentage of used memory
ram - The amount of RAM (in MB) the system has
tVals - ThresholdValues for the SystemMemoryUtilization
Method Detail

getTotal

public double getTotal()
Get the amount of total system memory

Returns:
The amount of total system memory in MB, or -1 if not available

getFree

public double getFree()
Get the amount of free memory

Returns:
The amount of free memory in MB, or -1 if not available

getUsed

public double getUsed()
Get the amount of used memory

Returns:
The amount of used memory in MB, or -1 if not available

getFreePercentage

public double getFreePercentage()
Get the percentage of free memory

Returns:
The percentage of free memory

getUsedPercentage

public double getUsedPercentage()
Get the percentage of used memory

Returns:
The percentage of used memory

getRam

public double getRam()
Get the amount of Random Access Memory (RAM) the system has

Returns:
The amount of RAM (in MB) the system has

toString

public String toString()
Overrides:
toString in class MeasuredResource

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.