Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
SIMIX call + MSG function + Java binding for get_core
[simgrid.git] / src / bindings / java / org / simgrid / msg / Host.java
index 6684147..3b7f41f 100644 (file)
@@ -16,7 +16,7 @@ package org.simgrid.msg;
  * Thus it is represented as a physical resource with computing capabilities, some 
  * mailboxes to enable running process to communicate with remote ones, and some private 
  * data that can be only accessed by local process. An instance of this class is always 
- * binded with the corresponding native host. All the native hosts are automatically created 
+ * bound with the corresponding native host. All the native hosts are automatically created
  * during the call of the method Msg.createEnvironment(). This method take as parameter a
  * platform file which describes all elements of the platform (host, link, root..).
  * You cannot create a host yourself.
@@ -101,6 +101,20 @@ public class Host {
         */ 
        public native static Host[] all();
 
+    /** 
+     * This static method sets a mailbox to receive in asynchronous mode.
+     * 
+     * All messages sent to this mailbox will be transferred to 
+     * the receiver without waiting for the receive call. 
+     * The receive call will still be necessary to use the received data.
+     * If there is a need to receive some messages asynchronously, and some not, 
+     * two different mailboxes should be used.
+     *
+     * @param mailboxName The name of the mailbox
+     */
+    public static native void setAsyncMailbox(String mailboxName);
+
+
        /**
         * This method returns the name of a host.
         * @return                      The name of the host.
@@ -150,6 +164,15 @@ public class Host {
         *
         */ 
        public native double getSpeed();
+
+       /**
+        * This method returns the number of core of a host.
+        *
+        * @return                      The speed of the processor of the host in flops.
+        *
+        */ 
+       public native double getCore();
+
        /**
         * Returns the value of a given host property. 
         */