Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Improved javadoc (yet not totally corrected). Added Derrick request for a kill (but...
[simgrid.git] / org / simgrid / msg / Task.java
index bc2cdaa..830805e 100644 (file)
@@ -9,7 +9,7 @@
  *(GNU LGPL) which comes with this package. 
  */
 
-package simgrid.msg;
+package org.simgrid.msg;
 
 /**
  * A task is either something to compute somewhere, or something to exchange between two hosts (or both).
@@ -64,7 +64,9 @@ public class Task {
        /* *                   * *
         * * Getters / Setters * *
         * *                   * */
-       /** Gets the name of a task */ 
+    /** Gets the name of a task
+     * @return
+     */
        public String getName() {
                return MsgNative.taskGetName(this);
        }
@@ -72,15 +74,21 @@ public class Task {
        Process getSender() {
                return MsgNative.taskGetSender(this);
        }
-       /** Gets the source of the task */ 
+    /** Gets the source of the task
+     * @return
+     */
        public Host getSource()  {
                return MsgNative.taskGetSource(this);
        }
-       /** Gets the computing amount of the task */ 
+    /** Gets the computing amount of the task
+     * @return
+     */
        public double getComputeDuration() {
                return MsgNative.taskGetComputeDuration(this);
        }
-       /** Gets the remaining computation of the task */ 
+    /** Gets the remaining computation of the task
+     * @return
+     */
        public double getRemainingDuration() {
                return MsgNative.taskGetRemainingDuration(this);
        }
@@ -106,15 +114,16 @@ public class Task {
        /**
         * Executes a task on the location on which the process is running.
         *
-        * @exception HostFailureException,TaskCancelledException 
-        */ 
+     *
+     * @throws HostFailureException
+     * @throws TaskCancelledException
+     */
        public void execute() throws HostFailureException,TaskCancelledException {
                MsgNative.taskExecute(this);
        }
        /**
         * Cancels a task.
         *
-        * @exception NativeException if the cancellation failed.
         */ 
        public void cancel()  {
                MsgNative.taskCancel(this);
@@ -131,7 +140,8 @@ public class Task {
        /**
         * Sends the task on the mailbox identified by the specified name 
         *
-        * @throws TimeoutException 
+     * @param mailbox
+     * @throws TimeoutException
         * @throws HostFailureException 
         * @throws TransferFailureException 
         */
@@ -142,7 +152,9 @@ public class Task {
        /**
         * Sends the task on the mailbox identified by the specified name (wait at most \a timeout seconds)
         *
-        * @exception  NativeException if the retrieval fails.
+     * @param mailbox
+     * @param timeout
+     * @exception  NativeException if the retrieval fails.
         * @throws TimeoutException 
         * @throws HostFailureException 
         * @throws TransferFailureException 
@@ -154,7 +166,11 @@ public class Task {
        /**
         * Sends the task on the mailbox identified by the specified alias  (capping the sending rate to \a maxrate) 
         *
-        * @exception  TransferFailureException, HostFailureException, TimeoutException.
+     * @param alias
+     * @param maxrate 
+     * @throws TransferFailureException
+     * @throws HostFailureException
+     * @throws TimeoutException
         */
        public void sendBounded(String alias, double maxrate) throws TransferFailureException, HostFailureException, TimeoutException {
                MsgNative.taskSendBounded(alias, this, maxrate);
@@ -163,7 +179,11 @@ public class Task {
        /**
         * Retrieves next task from the mailbox identified by the specified name
         *
-        * @exception  TransferFailureException, HostFailureException, TimeoutException if the retrieval fails.
+     * @param mailbox
+     * @return
+     * @throws TransferFailureException
+     * @throws HostFailureException
+     * @throws TimeoutException
         */
 
        public static Task receive(String mailbox) throws TransferFailureException, HostFailureException, TimeoutException {
@@ -173,7 +193,12 @@ public class Task {
        /**
         * Retrieves next task on the mailbox identified by the specified name (wait at most \a timeout seconds)
         *
-        * @exception  TransferFailureException, HostFailureException, TimeoutException if the retrieval fails.
+     * @param mailbox
+     * @param timeout
+     * @return 
+     * @throws TransferFailureException
+     * @throws HostFailureException
+     * @throws TimeoutException
         */
        public static Task receive(String mailbox, double timeout) throws  TransferFailureException, HostFailureException, TimeoutException {
                return MsgNative.taskReceive(mailbox, timeout, null);
@@ -182,7 +207,12 @@ public class Task {
        /**
         * Retrieves next task sent by a given host on the mailbox identified by the specified alias 
         *
-        * @exception  TransferFailureException, HostFailureException, TimeoutException if the retrieval fails.
+     * @param mailbox
+     * @param host
+     * @return
+     * @throws TransferFailureException
+     * @throws TimeoutException
+     * @throws HostFailureException
         */
 
        public static Task receive(String mailbox, Host host) throws TransferFailureException, HostFailureException, TimeoutException {
@@ -192,7 +222,13 @@ public class Task {
        /**
         * Retrieves next task sent by a given host on the mailbox identified by the specified alias (wait at most \a timeout seconds)
         *
-        * @exception  TransferFailureException, HostFailureException, TimeoutException if the retrieval fails.
+     * @param mailbox
+     * @param timeout 
+     * @param host
+     * @return 
+     * @throws TransferFailureException
+     * @throws HostFailureException
+     * @throws TimeoutException
         */
        public static Task receive(String mailbox, double timeout, Host host) throws TransferFailureException, HostFailureException, TimeoutException {
                return MsgNative.taskReceive(mailbox, timeout, host);
@@ -201,14 +237,20 @@ public class Task {
        /**
         * Tests whether there is a pending communication on the mailbox identified by the specified alias, and who sent it
         *
-        */ 
+     *
+     * @param mailbox
+     * @return
+     */
        public static int listenFrom(String mailbox)  {
                return MsgNative.taskListenFrom(mailbox);
        }
        /**
         * Listen whether there is a waiting task on the mailbox identified by the specified alias
         *
-        */ 
+     *
+     * @param mailbox
+     * @return
+     */
        public static boolean listen(String mailbox)   {
                return MsgNative.taskListen(mailbox);
        }
@@ -216,7 +258,11 @@ public class Task {
        /**
         * Counts the number of tasks waiting to be received on the \a mailbox identified by the specified alia and sended by the specified \a host.
         *
-        */ 
+     *
+     * @param alias
+     * @param host
+     * @return
+     */
        public static int listenFromHost(String alias, Host host)   {
                return MsgNative.taskListenFromHost(alias, host);
        }