com.caucho.health.check
Class MemoryPermGenHealthCheck

java.lang.Object
  extended by com.caucho.health.check.AbstractHealthCheck
      extended by com.caucho.env.health.AbstractMemoryHealthCheckImpl
          extended by com.caucho.env.health.MemoryPermGenHealthCheckImpl
              extended by com.caucho.health.check.MemoryPermGenHealthCheck
All Implemented Interfaces:
HealthCheck

@Singleton
@Configurable
@Named
public class MemoryPermGenHealthCheck
extends MemoryPermGenHealthCheckImpl

Monitors the amount of free memory in the PermGen pool. Requests a garbage collection if memory falls too low.

Note: This check does not apply to all JVM implementations, and will return UNKNOWN if there is no PermGen pool.

Generates UNKNOWN if memory pool attributes are not available in JMX.

Generates WARNING if free memory is below the warning percentage after a GC (default 1%)

Generates CRITICAL if free memory is below the the minimum after a GC (default 1 meg).


Constructor Summary
MemoryPermGenHealthCheck()
           
 
Method Summary
protected  AbstractHealthCheck findDelegate(HealthService healthService)
          Finds and returns any delegate health check.
protected  MemoryPermGenHealthCheck getDelegate()
           
 void setFreeWarning(double pFree)
          Set the warning threshold percentage (default 0.01)
 void setMemoryFreeMin(Bytes memoryMin)
          Set minimum amount of free memory (default 1m)
 void setObjectName(java.lang.String objectName)
          Explicitly set the MBean name to query for memory stats
 
Methods inherited from class com.caucho.env.health.MemoryPermGenHealthCheckImpl
getMemoryUsage, setObjectNameImpl
 
Methods inherited from class com.caucho.env.health.AbstractMemoryHealthCheckImpl
checkHealth, getMemoryFreeMin, getMemoryPool, setFreeWarningImpl, setMemoryFreeMinImpl
 
Methods inherited from class com.caucho.health.check.AbstractHealthCheck
getName, init, isEnabled, setEnabled, setName, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MemoryPermGenHealthCheck

public MemoryPermGenHealthCheck()
Method Detail

setMemoryFreeMin

@Configurable
public void setMemoryFreeMin(Bytes memoryMin)
Set minimum amount of free memory (default 1m)


setFreeWarning

@Configurable
public void setFreeWarning(double pFree)
Set the warning threshold percentage (default 0.01)


setObjectName

@Configurable
public void setObjectName(java.lang.String objectName)
Explicitly set the MBean name to query for memory stats


findDelegate

protected AbstractHealthCheck findDelegate(HealthService healthService)
Description copied from class: AbstractHealthCheck
Finds and returns any delegate health check. Used to configure singleton system health checks.

Overrides:
findDelegate in class AbstractHealthCheck

getDelegate

protected MemoryPermGenHealthCheck getDelegate()
Overrides:
getDelegate in class AbstractHealthCheck