org.jasig.cas.monitor
Class MemoryMonitor

java.lang.Object
  extended by org.jasig.cas.monitor.MemoryMonitor
All Implemented Interfaces:
Monitor<MemoryStatus>

public class MemoryMonitor
extends Object
implements Monitor<MemoryStatus>

Monitors JVM memory usage.

Since:
3.5.0
Author:
Marvin S. Addison

Field Summary
static int DEFAULT_FREE_MEMORY_WARN_THRESHOLD
          Default percent free memory warning threshold.
 
Constructor Summary
MemoryMonitor()
           
 
Method Summary
 String getName()
          Gets the name of the monitor.
 MemoryStatus observe()
          Observes the monitored resource and reports the status.
 void setFreeMemoryWarnThreshold(long threshold)
          Sets the percent of free memory below which a warning is reported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FREE_MEMORY_WARN_THRESHOLD

public static final int DEFAULT_FREE_MEMORY_WARN_THRESHOLD
Default percent free memory warning threshold.

See Also:
Constant Field Values
Constructor Detail

MemoryMonitor

public MemoryMonitor()
Method Detail

setFreeMemoryWarnThreshold

public void setFreeMemoryWarnThreshold(long threshold)
Sets the percent of free memory below which a warning is reported.

Parameters:
threshold - Percent free memory warning threshold.

getName

public String getName()
Gets the name of the monitor.

Specified by:
getName in interface Monitor<MemoryStatus>
Returns:
Monitor name.

observe

public MemoryStatus observe()
Observes the monitored resource and reports the status.

Specified by:
observe in interface Monitor<MemoryStatus>
Returns:
Status of monitored resource.


Copyright © 2004-2013 Jasig. All Rights Reserved.