com.quadrique.jbuildingblocks.core.process
Class JbbProcessMemoryWatchdog
java.lang.Object
java.lang.Thread
com.quadrique.jbuildingblocks.core.process.JbbProcessMemoryWatchdog
- All Implemented Interfaces:
- Runnable
public class JbbProcessMemoryWatchdog
- extends Thread
This thread keeps track of the memory consumption of the current process and it makes sure that the Garbage collector is called.
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
POLICY_IS_CALL_GC_FOR_EACH_DELTA_T
public static final int POLICY_IS_CALL_GC_FOR_EACH_DELTA_T
- See Also:
- Constant Field Values
POLICY_IS_CALL_GC_IF_MEMORY_USED_IS_ABOVE_THRESHOLD
public static final int POLICY_IS_CALL_GC_IF_MEMORY_USED_IS_ABOVE_THRESHOLD
- See Also:
- Constant Field Values
POLICY_IS_CALL_GC_IF_MEMORY_USED_DELTA_IS_ABOVE_THRESHOLD
public static final int POLICY_IS_CALL_GC_IF_MEMORY_USED_DELTA_IS_ABOVE_THRESHOLD
- See Also:
- Constant Field Values
POLICY_IS_CALL_GC_IF_FREE_MEMORY_IS_LESS_THAN_THRESHOLD
public static final int POLICY_IS_CALL_GC_IF_FREE_MEMORY_IS_LESS_THAN_THRESHOLD
- See Also:
- Constant Field Values
POLICY_IS_CALL_GC_IF_FREE_MEMORY_DELTA_IS_LESS_THAN_THRESHOLD
public static final int POLICY_IS_CALL_GC_IF_FREE_MEMORY_DELTA_IS_LESS_THAN_THRESHOLD
- See Also:
- Constant Field Values
JbbProcessMemoryWatchdog
public JbbProcessMemoryWatchdog(int zPollingInterval,
int zPolicy,
int zThreshold)
throws Exception
- constructor
- Parameters:
zPolicy - POLICY_IS_CALL_GC_FOR_EACH_DELTA_T to call the GC at regular interval, POLICY_IS_CALL_GC_IF_MEMORY_USED_IS_ABOVE_THRESHOLD...zPollingInterval - the polling interval in number of seconds (> 60s)zThreshold - use 0 if zPolicy is POLICY_IS_CALL_GC_FOR_EACH_DELTA_T, the threshold value in number of bytes otherwise
- Throws:
Exception
run
public void run()
- Specified by:
run in interface Runnable- Overrides:
run in class Thread
stopExecution
public void stopExecution()
Copyright © 2001-2008 Quadrique Corporation. All Rights Reserved.