|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mondrian.util.AbstractMemoryMonitor mondrian.util.NotificationMemoryMonitor
public class NotificationMemoryMonitor
The NotificationMemoryMonitor
class uses the Java5
memory management system to detect system low memory events.
This code is loosely based on the code taken from The Java Specialists' Newsletter, issue 92 authored by Dr. Heinz M. Kabutz. As a note, his on-line newletters are a good source of Java information, take a look.
For more information one should review the Java5 classes in java.lang.management.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class mondrian.util.AbstractMemoryMonitor |
---|
AbstractMemoryMonitor.Entry |
Nested classes/interfaces inherited from interface mondrian.util.MemoryMonitor |
---|
MemoryMonitor.Listener, MemoryMonitor.Test |
Field Summary | |
---|---|
protected static MemoryPoolMXBean |
TENURED_POOL
|
Constructor Summary | |
---|---|
NotificationMemoryMonitor()
Construct a NotificationMemoryMonitor instance and
register it with the Java5 memory management system. |
Method Summary | |
---|---|
protected org.apache.log4j.Logger |
getLogger()
Get the Logger . |
long |
getMaxMemory()
Get the maximum possible memory usage for this JVM instance. |
long |
getUsedMemory()
Get the current memory usage for this JVM instance. |
protected void |
notifyNewLowThreshold(long newLowThreshold)
Notify the Java5 memory management system that there is a new low threshold. |
Methods inherited from class mondrian.util.AbstractMemoryMonitor |
---|
addListener, addListener, convertPercentageToThreshold, convertThresholdToPercentage, generateLowThreshold, getDefaultThresholdPercentage, getLowThreshold, notifyListeners, removeAllListener, removeListener, resetFromTest, updateListenerThreshold, usagePercentage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final MemoryPoolMXBean TENURED_POOL
Constructor Detail |
---|
NotificationMemoryMonitor()
NotificationMemoryMonitor
instance and
register it with the Java5 memory management system.
Method Detail |
---|
protected org.apache.log4j.Logger getLogger()
Logger
.
getLogger
in class AbstractMemoryMonitor
Logger
.protected void notifyNewLowThreshold(long newLowThreshold)
notifyNewLowThreshold
in class AbstractMemoryMonitor
newLowThreshold
- the new threshold.public long getMaxMemory()
public long getUsedMemory()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |