* @return The number of running tasks.
*/
final static native int hostGetLoad(Host host);
-
- /******************************************************************
- * The natively implemented methods connected to the MSG task *
- ******************************************************************/
-
- /**
- * The natively implementd method to get the source of a task.
- *
- * @param task The task to get the source.
- *
- * @return The source of the task.
- *
- *
- * @see Task.getSource()
- */
- final static native Host taskGetSource(Task task);
-
- /**
- * The natively implemented method to cancel a task.
- *
- * @param task The task to cancel.
- *
- *
- * @see Task.cancel().
- */
- final static native void taskCancel(Task task);
-
- /**
- * The natively implemented method to get the computing amount of the task.
- *
- * @param task The task to get the computing amount.
- *
- * @return The computing amount of the specified task.
- *
- * @see Task.getComputeDuration()
- */
- final static native double taskGetComputeDuration(Task task);
-
- /**
- * The natively implemented method to get the remaining computation
- *
- * @param task The task to get the remaining computation.
- *
- * @return The remaining computation of the specified task.
- *
- * @see Task.getRemainingDuration()
- */
- final static native double taskGetRemainingDuration(Task task);
-
- /**
- * The natively implemented method to set the priority of a task.
- *
- * @param task The task to set the priority
- *
- * @param priority The new priority of the specified task.
- *
- * @see Task.setPriority()
- */
- final static native void taskSetPriority(Task task, double priority);
-
- /**
- * The natively implemented method to execute a MSG task.
- *
- * @param task The task to execute.
- *
- * @exception HostFailureException,TaskCancelledException on error in the C world
- *
- * @see Task.execute()
- */
- final static native void taskExecute(Task task) throws HostFailureException,TaskCancelledException;
-
- /* ****************************************************************
- * Communication methods thru mailboxes *
- **************************************************************** */
-
- final static native void taskSend(String alias, Task task, double timeout) throws TransferFailureException,HostFailureException,TimeoutException;
- final static native Task taskReceive(String alias, double timeout, Host host) throws TransferFailureException,HostFailureException,TimeoutException;
- final static native int taskListenFrom(String alias);
- final static native boolean taskListen(String alias);
- final static native int taskListenFromHost(String alias, Host host);
-
- /* ***************************************************************
- * Task sending methods *
- *************************************************************** */
-
- /**
- * The natively implemented method to send a task in a mailbox associated with an alias, with a bounded transmition
- * rate.
- *
- * @param alias The alias of the mailbox.
- * @param task The task to put.
- * @param max_rate The bounded transmition rate.
- *
- * @exception NativeException on error in the C world
- */
- final static native void taskSendBounded(String alias, Task task, double maxrate) throws TransferFailureException,HostFailureException,TimeoutException;
-
}