Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove a method that is deprecated since a very long time
[simgrid.git] / org / simgrid / msg / Host.java
index de12f11..e5548b9 100644 (file)
@@ -56,7 +56,10 @@ public class Host {
         * User data.
         */ 
        private Object data;
-       protected Host() {
+    /**
+     *
+     */
+    protected Host() {
                this.bind = 0;
                this.data = null;
        };
@@ -67,11 +70,13 @@ public class Host {
         *
         * @param name          The name of the host to get.
         *
-        * @exception           HostNotFoundException if the name of the host is not valid.
+     * @return
+     * @exception              HostNotFoundException if the name of the host is not valid.
         *                                      NativeException if the native version of this method failed.
         */ 
        public static Host getByName(String name) 
        throws HostNotFoundException {
+       Process.ifInterruptedStop();
                if (name==null)
                        throw new NullPointerException("No host can have a null name");
                return MsgNative.hostGetByName(name);
@@ -84,6 +89,7 @@ public class Host {
         *
         */ 
        public static int getCount() {
+       Process.ifInterruptedStop();
                return MsgNative.hostGetCount();
        }
 
@@ -93,6 +99,7 @@ public class Host {
         * @return                      The host on which the current process is executed.
         */ 
        public static Host currentHost() {
+       Process.ifInterruptedStop();
                return MsgNative.hostSelf();
        }
 
@@ -103,6 +110,7 @@ public class Host {
         *
         */ 
        public static Host[] all()  {
+       Process.ifInterruptedStop();
                return MsgNative.allHosts();
        }
 
@@ -113,27 +121,37 @@ public class Host {
         *
         */ 
        public String getName()  {
+       Process.ifInterruptedStop();
                return MsgNative.hostGetName(this);
        }
 
        /**
         * Sets the data of the host.
         *
-        */ 
+     *
+     * @param data
+     */
        public void setData(Object data) {
+       Process.ifInterruptedStop();
                this.data = data;
        } 
        /**
         * Gets the data of the host.
-        */ 
+     *
+     * @return
+     */
        public Object getData() {
+       Process.ifInterruptedStop();
                return this.data;
        }
 
        /**
         * Checks whether a host has data.
-        */ 
+     *
+     * @return
+     */
        public boolean hasData() {
+       Process.ifInterruptedStop();
                return null != this.data;
        }
 
@@ -144,6 +162,7 @@ public class Host {
         * @return                      The number of tasks currently running on a host.
         */ 
        public int getLoad() {
+       Process.ifInterruptedStop();
                return MsgNative.hostGetLoad(this);
        }
 
@@ -155,11 +174,15 @@ public class Host {
         *
         */ 
        public double getSpeed() {
+       Process.ifInterruptedStop();
                return MsgNative.hostGetSpeed(this);
        }
 
-       /** This method tests if a host is avail. */
+    /** This method tests if a host is avail.
+     * @return
+     */
        public boolean isAvail() {
+       Process.ifInterruptedStop();
                return MsgNative.hostIsAvail(this);
        }
 }