|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
org.pajes.html.PajeMemoryManager
public class PajeMemoryManager
The PajeMemoryManager is responsible for destroying Paje instances after they have been finished with, and can also intermittently suggest that the garbage collector should run.
PajeMemoryManager can be configured to call System.gc() at a
minimum interval by having a <context-param> with a
<param-name> of
org.pajes.html.PajeMemoryManager.gcInterval. in the web
application deployment descriptor. The a <param-value>
of this parameter should be a positive integer to set the interval, or a
negative integer to turn off forced garbage collection.
Note that the interval is a minimum interval: garbage collection is only suggested when a Paje is being destroyed and the minimum interval has elapsed.
The following example calls System.gc() at a minimum interval
of 1 minute:
<context-param>
<param-name>org.pajes.html.PajeMemoryManager.gcInterval</param-name>
<param-value>60000</param-value>
</context-param>
The following example calls System.gc() every time a Paje is
destroyed:
<context-param>
<param-name>org.pajes.html.PajeMemoryManager.gcInterval</param-name>
<param-value>0</param-value>
</context-param>
The following example turns off the calls to System.gc():
<context-param>
<param-name>org.pajes.html.PajeMemoryManager.gcInterval</param-name>
<param-value>-1</param-value>
</context-param>
Alternatively, the entire <context-param> could be removed to turn off garbage collection.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Method Summary | |
|---|---|
void |
run()
Monitors the queue, waiting for notification that a Paje has been finished with. |
void |
shutdown()
Shuts down this PajeMemoryManager. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, clone, 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 |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void shutdown()
|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||