Rio Project 4.2 API Documentation



org.rioproject.system.measurable.memory
Class CalculableMemory

java.lang.Object
  extended by org.rioproject.watch.Calculable
      extended by org.rioproject.system.measurable.memory.CalculableMemory
All Implemented Interfaces:
Serializable

public class CalculableMemory
extends Calculable

A Calculable used to collect process Memory utilization

Author:
Dennis Reedy
See Also:
Serialized Form

Constructor Summary
CalculableMemory(String id, double utilization, long when)
          Creates new CalculableMemory
CalculableMemory(String id, double utilization, ProcessMemoryUtilization memoryUtilization, long when)
          Creates new CalculableMemory
 
Method Summary
 String getArchiveRecord()
          Gets an archival representation for this Calculable
 double getFreeMemory()
          Get the free memory
 double getTotalMemory()
          Getter for property totalMemory.
 double getUsedMemory()
          Get the used memory
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class org.rioproject.watch.Calculable
equals, getDate, getDetail, getId, getValue, getWhen, hashCode, setDetail, setId, setValue, setWhen
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CalculableMemory

public CalculableMemory(String id,
                        double utilization,
                        long when)
Creates new CalculableMemory

Parameters:
id - The identifier for this Calculable record
utilization - The utilization for the Calculable Record
when - The time when the recorded utilization was captured

CalculableMemory

public CalculableMemory(String id,
                        double utilization,
                        ProcessMemoryUtilization memoryUtilization,
                        long when)
Creates new CalculableMemory

Parameters:
id - The identifier for this Calculable record
utilization - The utilization for the Calculable Record
memoryUtilization - Contains details for JVM memory utilization
when - The time when the recorded utilization was captured
Method Detail

getTotalMemory

public double getTotalMemory()
Getter for property totalMemory.

Returns:
Value of property totalMemory.

getUsedMemory

public double getUsedMemory()
Get the used memory

Returns:
The amount of used memory

getFreeMemory

public double getFreeMemory()
Get the free memory

Returns:
The amount of free memory

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Calculable
Returns:
a string representation of the object.

getArchiveRecord

public String getArchiveRecord()
Gets an archival representation for this Calculable

Overrides:
getArchiveRecord in class Calculable
Returns:
a string representation in archive format

Copyright © Rio Project.

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