|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.util.logging.MemoryLogger
public class MemoryLogger
allows to monitor memory usage through a Logger.
| Constructor Summary | |
|---|---|
MemoryLogger(Logger logger,
long intervalMillis)
|
|
| Method Summary | |
|---|---|
void |
endLogging()
causes the run() method to end |
Logger |
getLogger()
|
void |
log()
logs memory settings into the log, using free and total as parameters (in bytes) |
void |
pauseLogging()
pauses logging and may be resumed |
void |
resumeLogging()
resumes logging in case it was paused |
void |
run()
continuously calls log() once within the interval while enabled |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MemoryLogger(Logger logger,
long intervalMillis)
| Method Detail |
|---|
public Logger getLogger()
public void log()
public void run()
log() once within the interval while enabled
run in interface Runnable
public void pauseLogging()
throws IllegalStateException
IllegalStateException - if the logging has already ended
public void resumeLogging()
throws IllegalStateException
IllegalStateException - if the logging has already ended
public void endLogging()
throws IllegalStateException
IllegalStateException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||