|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.util.admin.extern.LowMemoryDetector
public class LowMemoryDetector
Get notification when heap memory usage exceeds 90%. Configuration:
-xmlBlaster/jmx/observeLowMemory Write a log error when 90% of the JVM memory is used (JDK >= 1.5) [true] -xmlBlaster/jmx/memoryThresholdFactor Configure the log error memory threshhold (defaults to 90%) (JDK >= 1.5) [0.9] -xmlBlaster/jmx/exitOnMemoryThreshold If true xmlBlaster stops if the memoryThresholdFactor is reached (JDK >= 1.5) [false]
Field Summary | |
---|---|
private static java.util.logging.Logger |
log
|
private javax.management.MBeanServer |
mbeanServer
|
private java.lang.management.MemoryPoolMXBean |
pool
|
private double |
thresholdFactor
|
Constructor Summary | |
---|---|
LowMemoryDetector()
Default ctor for 90% threshold and registered DefaultLowMemoryListener. |
|
LowMemoryDetector(float thresholdFactor)
|
Method Summary | |
---|---|
javax.management.MBeanServer |
getMBeanServer()
|
static void |
main(java.lang.String[] args)
Tester: java -Xms2M -Xmx3M -Dcom.sun.management.jmxremote -DxmlBlaster/jmx/exitOnMemoryThreshold=true org.xmlBlaster.util.admin.extern.LowMemoryDetector |
static long |
maxJvmMemory()
Access the max available RAM for this JVM. |
void |
register(javax.management.NotificationListener listener)
Register your low memory listener. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.util.logging.Logger log
private javax.management.MBeanServer mbeanServer
private java.lang.management.MemoryPoolMXBean pool
private double thresholdFactor
Constructor Detail |
---|
public LowMemoryDetector()
public LowMemoryDetector(float thresholdFactor)
thresholdFactor
- Use typically 0.9, if 90% of heap is used up the
listener is triggeredMethod Detail |
---|
public static long maxJvmMemory()
public javax.management.MBeanServer getMBeanServer()
public void register(javax.management.NotificationListener listener)
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |