protected native void open(String storage, String path, String mode);
/**
* Read elements of a file.
- * @param storage is the name where you can find the stream
* @param size of each element
* @param nMemb is the number of elements of data to write
*/
public native long read(long size, long nMemb);
/**
* Write elements into a file.
- * @param storage is the name where you can find the stream
* @param size of each element
* @param nMemb is the number of elements of data to write
*/
public native long write(long size, long nMemb);
/**
* Close the file.
- * @param storage is the name where you can find the stream
*/
public native void close();
*
* @param name The name of the host to get.
*
- * @return
+ * @return The host object with the given name.
* @exception HostNotFoundException if the name of the host is not valid.
* NativeException if the native version of this method failed.
*/
this.data = data;
}
/**
- * Gets the d ata of the host.
+ * Gets the data of the host.
*
- * @return
+ * @return The data object associated with the host.
*/
public Object getData() {
return this.data;
/**
* Checks whether a host has data.
*
- * @return
+ * @return True if the host has an associated data object.
*/
public boolean hasData() {
return null != this.data;
*/
public native double getSpeed();
/**
- * @brief Returns the value of a given host property.
+ * Returns the value of a given host property.
*/
public native String getProperty(String name);
/**
- * @brief Change the value of a given host property.
+ * Change the value of a given host property.
*/
public native void setProperty(String name, String value);
- /** This method tests if a host is avail.
- * @return
+ /** This method tests if a host is available.
+ * @return True if the host is available.
*/
public native boolean isAvail();
}
/** Retrieve the simulation time
- * @return
+ * @return The simulation time.
*/
public final static native double getClock();
/**
* The natively implemented method to initialize a MSG simulation.
*
* @param args The arguments of the command line of the simulation.
- *
- * @see Msg.init()
*/
public final static native void init(String[]args);
* {@link #clean()} if you really insist on cleaning the C side), so you can freely
* retrieve the informations that you want from the simulation. In particular, retrieving the status
* of a process or the current date is perfectly ok.
- *
- * @see MSG_run
*/
public final static native void run() ;
}
/**
* The natively implemented method to create an MSG process.
- * @param host A valid (binded) host where create the process.
+ * @param hostName A valid (binded) host where create the process.
*/
protected native void create(String hostName) throws HostNotFoundException;
/**
return ppid;
}
/**
- * @brief Returns the value of a given process property.
+ * Returns the value of a given process property.
*/
public native String getProperty(String name);
/**
* Migrates a process to another host.
*
- * @param process The process to migrate.
* @param host The host where to migrate the process.
*
*/
private String name;
/**
- * @brief Create a new empty VM.
- * @bug it is expected that in the future, the coreAmount parameter will be used
+ * Create a new empty VM.
+ * NOTE: it is expected that in the future, the coreAmount parameter will be used
* to add extra constraints on the execution, but the argument is ignored for now.
*/
public VM(Host host, String name, int coreAmount) {
*/
private native void start(Host host, String name, int coreAmount);
- /** @brief Returns whether the given VM is currently suspended
+ /** Returns whether the given VM is currently suspended
*/
public native boolean isSuspended();
- /** @brief Returns whether the given VM is currently running
+ /** Returns whether the given VM is currently running
*/
public native boolean isRunning();
- /** @brief Add the given process into the VM.
+ /** Add the given process into the VM.
* Afterward, when the VM is migrated or suspended or whatever, the process will have the corresponding handling, too.
*/
public native void bind(Process process);
- /** @brief Removes the given process from the given VM, and kill it
+ /** Removes the given process from the given VM, and kill it
* Will raise a ProcessNotFound exception if the process were not binded to that VM
*/
public native void unbind(Process process);
- /** @brief Immediately change the host on which all processes are running
+ /** Immediately change the host on which all processes are running
*
* No migration cost occurs. If you want to simulate this too, you want to use a
* Task.send() before or after, depending on whether you want to do cold or hot
* migration.
*/
public native void migrate(Host destination);
- /** @brief Immediately suspend the execution of all processes within the given VM
+ /** Immediately suspend the execution of all processes within the given VM
*
* No suspension cost occurs. If you want to simulate this too, you want to
* use a \ref File.write() before or after, depending on the exact semantic
* of VM suspend to you.
*/
public native void suspend();
- /** @brief Immediately resumes the execution of all processes within the given VM
+ /** Immediately resumes the execution of all processes within the given VM
*
* No resume cost occurs. If you want to simulate this too, you want to
* use a \ref File.read() before or after, depending on the exact semantic
*/
public native void resume();
/**
- * @brief Immediately kills all processes within the given VM. Any memory that they allocated will be leaked.
+ * Immediately kills all processes within the given VM. Any memory that they allocated will be leaked.
* No extra delay occurs. If you want to simulate this too, you want to use a MSG_process_sleep() or something
*/
public native void shutdown();
/**
- * @brief Reboot the VM, restarting all the processes in it.
+ * Reboot the VM, restarting all the processes in it.
*/
public native void reboot();