| |
|
| java.lang.Object java.lang.Thread org.h2.test.unit.SelfDestructor
SelfDestructor | public class SelfDestructor extends Thread (Code) | | This is a self-destructor class to kill a long running process automatically
after a pre-defined time. The class reads the number of minutes from the
system property 'h2.selfDestruct' and starts a countdown thread to kill the
virtual machine if it still runs then.
|
Method Summary | |
public static String | getPropertyString(int minutes) Get the string to be added when starting the Java process. | public static void | startCountdown(int defaultMinutes) Start the countdown. |
getPropertyString | public static String getPropertyString(int minutes)(Code) | | Get the string to be added when starting the Java process.
Parameters: minutes - the countdown time in minutes the setting |
startCountdown | public static void startCountdown(int defaultMinutes)(Code) | | Start the countdown. If the self-destruct system property is set, this
value is used, otherwise the given default value is used.
Parameters: defaultMinutes - the default number of minutes after which thecurrent process is killed. |
|
|
|