NativeException {
MsgNative.hostPut(this, channel, task, -1);
}
- /** Send the given task to the given channel of the host (waiting at most #timeout seconds) */
+ /** Send the given task to the given channel of the host (waiting at most \e timeout seconds) */
public void put(int channel, Task task,
double timeout) throws JniException, NativeException {
}
- /** Send the given task to the given channel of the host (capping the emision rate to #maxrate) */
+ /** Send the given task to the given channel of the host (capping the emision rate to \e maxrate) */
public void putBounded(int channel, Task task,
double maxrate) throws JniException,
MsgNative.taskSend(alias, task, -1);
}
- /** Send the given task in the mailbox associated with the alias of the current host (waiting at most #timeout seconds) */
+ /** Send the given task in the mailbox associated with the alias of the current host (waiting at most \e timeout seconds) */
public void send(Task task, double timeout) throws JniException, NativeException {
String alias = this.getName() + ":" + Process.currentProcess().msgName();
MsgNative.taskSend(alias, task, timeout);
}
- /** Send the given task to mailbox associated with the specified alias (waiting at most #timeout seconds) */
+ /** Send the given task to mailbox associated with the specified alias (waiting at most \e timeout seconds) */
public void send(String alias, Task task, double timeout) throws JniException, NativeException {
MsgNative.taskSend(alias, task, timeout);
}
- /** Send the given task to the mailbox associated with the default alias (capping the emision rate to #maxrate) */
+ /** Send the given task to the mailbox associated with the default alias (capping the emision rate to \e maxrate) */
public void sendBounded(Task task, double maxrate) throws JniException, NativeException {
String alias = this.getName() + ":" + Process.currentProcess().msgName();
MsgNative.taskSendBounded(alias, task, maxrate);
}
- /** Send the given task to the mailbox associated with the specified alias (capping the emision rate to #maxrate) */
+ /** Send the given task to the mailbox associated with the specified alias (capping the emision rate to \e maxrate) */
public void sendBounded(String alias, Task task, double maxrate) throws JniException, NativeException {
MsgNative.taskSendBounded(alias, task, maxrate);
}
* }
* The name of your process must be declared in the deployment file of your simulation.
* For the exemple, for the previouse process Slave this file must contains a line :
- * <process host="Maxims" function="Slave"/>, where Maxims is the host of the process
+ * <process host="Maxims" function="Slave"/>, where Maxims is the host of the process
* Slave. All the process of your simulation are automaticaly launched and managed by Msg.
* A process use tasks to simulate communications or computations with another process.
* For more information see Task. For more information on host concept
* Constructs a new process from the name of a host and his name. The method
* function of the process doesn't have argument.
*
- * @param hostName The name of the host of the process to create.
+ * @param hostname The name of the host of the process to create.
* @param name The name of the process.
*
* @exception HostNotFoundException if no host with this name exists.
* Constructs a new process from the name of a host and his name. The arguments
* of the method function of the process are specified by the parameter args.
*
- * @param hostName The name of the host of the process to create.
+ * @param hostname The name of the host of the process to create.
* @param name The name of the process.
* @param args The arguments of the main function of the process.
*
* NullPointerException if the provided name is null
* JniException on JNI madness
*
- */ public Process(String hostname, String name, String args[])
- throws NullPointerException, HostNotFoundException, JniException,
+ */
+ public Process(String hostname, String name, String args[])
+ throws NullPointerException, HostNotFoundException, JniException,
NativeException {
this(Host.getByName(hostname), name, args);
}
/**
* This function migrates a process to another host.
*
- * @parm host The host where to migrate the process.
+ * @param host The host where to migrate the process.
*
* @exception JniException on JNI madness
* NativeException on error in the native SimGrid code
*
* @param name The name of the parallel task.
* @param hosts The list of hosts implied by the parallel task.
- * @param computeDurations The amount of operations to be performed by each host of @hosts.
+ * @param computeDurations The amount of operations to be performed by each host of \e hosts.
* @param messageSizes A matrix describing the amount of data to exchange between hosts.
*
* @exception JniException if the binding mecanism fails.
*/ public double getRemainingDuration() throws JniException {
return MsgNative.taskGetRemainingDuration(this);
}
- /**
- * This method sets the priority of the computation of the task.
- * The priority doesn't affect the transfert rate. For example a
- * priority of 2 will make the task receive two times more cpu than
- * the other ones.
- *
- * @param The new priority of the task.
- *
- * @exception InvalidTaskException is the specified task is not valid. A task
- * is invalid if it is not binded with a native task.
- */ public void setPrirority(double priority) throws JniException {
- MsgNative.taskSetPriority(this, priority);
- }
+ /**
+ * This method sets the priority of the computation of the task.
+ * The priority doesn't affect the transfert rate. For example a
+ * priority of 2 will make the task receive two times more cpu than
+ * the other ones.
+ *
+ * @param priority The new priority of the task.
+ *
+ * @exception JniException is the specified task is not valid (ie, not binded to a native task)
+ */
+ public void setPriority(double priority) throws JniException {
+ MsgNative.taskSetPriority(this, priority);
+ }
/* * * *
* * Communication-related * *
- * * * *//**
+ * * * */
+
+ /**
* Retrieves next task on given channel of local host
*
* @exception JniException if the binding mecanism fails.
return MsgNative.taskGet(channel, -1.0, null);
}
/**
- * Retrieves next task on given channel of local host (wait at most #timeout seconds)
+ * Retrieves next task on given channel of local host (wait at most \e timeout seconds)
*
* @exception JniException if the binding mecanism fails.
* @exception NativeException if the retrival fails.
return MsgNative.taskGet(channel, -1, host);
}
/**
- * Retrieves next task from given host on given channel of local host (wait at most #timeout seconds)
+ * Retrieves next task from given host on given channel of local host (wait at most \e timeout seconds)
*
* @exception JniException if the binding mecanism fails.
* @exception NativeException if the retrival fails.
return MsgNative.taskProbe(channel);
}
/**
- * Counts tasks waiting on the given #channel of local host and sent by given #host
+ * Counts tasks waiting on the given \e channel of local host and sent by given \e host
*
* @exception JniException if the binding mecanism fails.
*/ public static int probe(int channel, Host host) throws JniException {
/* * * *
* * Computation-related * *
- * * * *//**
- * This method execute a task on the location on which the
- * process is running.
- *
- * @exception JniException if the binding mecanism fails.
- * @exception NativeException if the cancelation failed.
- */ public void execute() throws JniException, NativeException {
- MsgNative.taskExecute(this);
- }
+ * * * */
+ /**
+ * This method execute a task on the location on which the
+ * process is running.
+ *
+ * @exception JniException if the binding mecanism fails.
+ * @exception NativeException if the cancelation failed.
+ */
+ public void execute() throws JniException, NativeException {
+ MsgNative.taskExecute(this);
+ }
/**
* This method cancels a task.
*
}
/**
- * Send the task on the mailbox identified by the default alias (wait at most #timeout seconds)
+ * Send the task on the mailbox identified by the default alias (wait at most \e timeout seconds)
*
* @exception JniException if the binding mecanism fails.
* @exception NativeException if the retrival fails.
}
/**
- * Send the task on the mailbox identified by the specified alias (wait at most #timeout seconds)
+ * Send the task on the mailbox identified by the specified alias (wait at most \e timeout seconds)
*
* @exception JniException if the binding mecanism fails.
* @exception NativeException if the retrival fails.
/**
- * Send the task on the mailbox identified by the default alias (capping the emision rate to #maxrate)
+ * Send the task on the mailbox identified by the default alias (capping the emision rate to \e maxrate)
*
* @exception JniException if the binding mecanism fails.
* @exception NativeException if the retrival fails.
}
/**
- * Send the task on the mailbox identified by the specified alias (capping the emision rate to #maxrate)
+ * Send the task on the mailbox identified by the specified alias (capping the emision rate to \e maxrate)
*
* @exception JniException if the binding mecanism fails.
* @exception NativeException if the retrival fails.
}
/**
- * Retrieves next task on the mailbox identified by the specified alias (wait at most #timeout seconds)
+ * Retrieves next task on the mailbox identified by the specified alias (wait at most \e timeout seconds)
*
* @exception JniException if the binding mecanism fails.
* @exception NativeException if the retrival fails.
}
/**
- * Retrieves next task sended by a given host on the mailbox identified by the specified alias (wait at most #timeout seconds)
+ * Retrieves next task sended by a given host on the mailbox identified by the specified alias (wait at most \e timeout seconds)
*
* @exception JniException if the binding mecanism fails.
* @exception NativeException if the retrival fails.
return MsgNative.taskListenFrom(alias);
}
- /**
+ /**
* Listen whether there is a waiting task on the mailbox identified by the specified alias
*
* @exception JniException if the binding mecanism fails.
return MsgNative.taskListen(alias);
}
- /**
- * Counts the number of tasks waiting to be received on the #mailbox identified by the specified alias and sended by the current host.
+ /**
+ * Counts the number of tasks waiting to be received on the \e mailbox identified by the specified alias and sended by the current host.
*
* @exception JniException if the binding mecanism fails.
* @exception NativeException if the retrival fails.
return MsgNative.taskListenFromHost(alias,host);
}
- /**
- * Counts the number of tasks waiting to be received on the #mailbox identified by the specified alia and sended by the specified #host.
+ /**
+ * Counts the number of tasks waiting to be received on the \e mailbox identified by the specified alia and sended by the specified \e host.
*
* @exception JniException if the binding mecanism fails.
* @exception NativeException if the retrival fails.