|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
com.aicas.jamaica.lang.MemoryReservationThread
public class MemoryReservationThread
The MemoryReservationThread is a low-priority thread that constantly reserves the amount of memory that was requested by the user to be reserved for allocation bursts.
This thread is started if the percentage is given, even if we are in -analyse mode. This ensures that the memory occupied by this thread will be taken into account in -analyse mode.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static int |
priority
The priority of this thread. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
MemoryReservationThread()
Create the reservation thread and start it. |
|
| Method Summary | |
|---|---|
void |
addAlarmHandler(AsyncEventHandler aeh)
Add a handler that is fired whenever the amount of reserved memory reached 0. |
static int |
minReservedMemory(boolean reset)
minReservedMemory resturns the lowest value the amount of reserved memory has ever reached. |
static int |
reservedMemory()
reservedMemory returns the current amount of reserved memory. |
static int |
reservedMemoryPercentage()
Percentage of memory that is to be reserved. |
void |
run()
Main GCThread run method. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, countStackFrames0, 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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int priority
| Constructor Detail |
|---|
public MemoryReservationThread()
| Method Detail |
|---|
public static int reservedMemoryPercentage()
public static int reservedMemory()
public static int minReservedMemory(boolean reset)
reset - true to reset the amount of reserved memory, falso
to leave the value unchanged.
public void run()
run in interface Runnablerun in class Threadpublic void addAlarmHandler(AsyncEventHandler aeh)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||