com.caucho.health.check
Class MemoryTenuredHealthCheck

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

@Singleton
@Configurable
@Named
public class MemoryTenuredHealthCheck
extends MemoryTenuredHealthCheckImpl

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

Note: This check will query heap memory for JVMs with no Tenured 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). This can also be configured by setting <memory-free-min >.


Constructor Summary
MemoryTenuredHealthCheck()
           
 
Method Summary
protected  AbstractHealthCheck findDelegate(HealthService healthService)
          Finds and returns any delegate health check.
protected  MemoryTenuredHealthCheck 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.MemoryTenuredHealthCheckImpl
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

MemoryTenuredHealthCheck

public MemoryTenuredHealthCheck()
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 MemoryTenuredHealthCheck getDelegate()
Overrides:
getDelegate in class AbstractHealthCheck