/**
* This method kill a process.
- * @param process the process to be killed.
*
*/
public native void kill();
/**
* Suspends the process by suspending the task on which it was
* waiting for the completion.
- *
*/
- public native void pause();
+ public native void suspend();
+ /**
+ * Suspends the process by suspending the task on which it was
+ * waiting for the completion.
+ * DEPRECATED: use suspend instead.
+ */
+ @Deprecated
+ public void pause() {
+ suspend();
+ }
/**
* Resumes a suspended process by resuming the task on which it was
* waiting for the completion.
- *
- *
+ * DEPRECATED: use resume instead.
*/
- public native void restart();
+ @Deprecated
+ public void restart() {
+ resume();
+ }
+ /**
+ * Resumes a suspended process by resuming the task on which it was
+ * waiting for the completion.
+ */
+ public native void resume();
/**
* Tests if a process is suspended.
*
public int getPPID() {
return ppid;
}
+ /**
+ * Set the kill time of the process
+ * @param killTime the time when the process is killed
+ */
+ public native void setKillTime(double killTime);
+
/**
* This static method returns the currently running process.
*
* @param host The host where to migrate the process.
*
*/
- public native static void migrate(Process process, Host host);
+ public native void migrate(Host host);
/**
* Makes the current process sleep until millis millisecondes have elapsed.
* You should note that unlike "waitFor" which takes seconds, this method takes milliseconds.
* FIXME: Not optimal, maybe we should have two native functions.
* @param millis the length of time to sleep in milliseconds.
*/
- public static void sleep(long millis) {
+ public static void sleep(long millis) throws HostFailureException {
sleep(millis,0);
}
/**
* @param millis the length of time to sleep in milliseconds.
* @param nanos additionnal nanoseconds to sleep.
*/
- public native static void sleep(long millis, int nanos);
+ public native static void sleep(long millis, int nanos) throws HostFailureException;
/**
* Makes the current process sleep until time seconds have elapsed.
* @param seconds The time the current process must sleep.
*/
- public native void waitFor(double seconds);
+ public native void waitFor(double seconds) throws HostFailureException;
/**
*
*/