package org.simgrid.msg;
import java.util.Arrays;
-import java.util.Hashtable;
import java.util.Vector;
-import java.lang.Runnable;
-import java.util.concurrent.Semaphore;
/**
* A process may be defined as a code, with some private data, executing
* Kill time of the process
*/
public double killTime = -1;
-
- public Hashtable<String,String> properties;
-
+
/**
* The name of the process.
*/
this.name = null;
this.bind = 0;
this.args = new Vector<String>();
- this.properties = null;
}
this.args = new Vector<String>();
if (null != args)
this.args.addAll(Arrays.asList(args));
-
- this.properties = new Hashtable<String,String>();
}
/**
* Constructs a new process from a host and his name, the arguments of here method function are
this.args = new Vector<String>();
if (null != args)
this.args.addAll(Arrays.asList(args));
-
- this.properties = new Hashtable<String,String>();
-
+
this.startTime = startTime;
this.killTime = killTime;
}
public int getPPID() {
return ppid;
}
+ /**
+ * @brief Returns the value of a given process property.
+ */
+ public native String getProperty(String name);
+
/**
* Set the kill time of the process
* @param killTime the time when the process is killed
*/
public static native void nativeInit();
static {
+ Msg.nativeInit();
nativeInit();
}
+ /**
+ * This static method returns the current amount of processes running
+ *
+ * @return The count of the running processes
+ */
+ public native static int getCount();
+
}