A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'hypervisor' into surf++
[simgrid.git]
/
src
/
bindings
/
java
/
org
/
simgrid
/
msg
/
Host.java
diff --git
a/src/bindings/java/org/simgrid/msg/Host.java
b/src/bindings/java/org/simgrid/msg/Host.java
index
82a4753
..
c629598
100644
(file)
--- a/
src/bindings/java/org/simgrid/msg/Host.java
+++ b/
src/bindings/java/org/simgrid/msg/Host.java
@@
-1,7
+1,7
@@
/*
* Bindings to the MSG hosts
*
/*
* Bindings to the MSG hosts
*
- * Copyright
2006-2012 The SimGrid Team
+ * Copyright
(c) 2006-2013. The SimGrid Team.
* All right reserved.
*
* This program is free software; you can redistribute
* All right reserved.
*
* This program is free software; you can redistribute
@@
-53,7
+53,7
@@
public class Host {
/**
* Host name
*/
/**
* Host name
*/
- pr
ivate
String name;
+ pr
otected
String name;
/**
* User data.
/**
* User data.
@@
-66,6
+66,11
@@
public class Host {
this.bind = 0;
this.data = null;
};
this.bind = 0;
this.data = null;
};
+
+ public String toString (){
+ return this.name;
+
+ }
/**
* This static method gets an host instance associated with a native
/**
* This static method gets an host instance associated with a native
@@
-123,6
+128,7
@@
public class Host {
public String getName() {
return name;
}
public String getName() {
return name;
}
+
/**
* Sets the data of the host.
* @param data
/**
* Sets the data of the host.
* @param data
@@
-148,6
+154,17
@@
public class Host {
return null != this.data;
}
return null != this.data;
}
+ /**
+ * This method start the host if it is off
+ */
+ public native void on();
+
+ /**
+ * This method stop the host if it is on
+ */
+ public native void off();
+
+
/**
* This method returns the number of tasks currently running on a host.
* The external load is not taken in account.
/**
* This method returns the number of tasks currently running on a host.
* The external load is not taken in account.
@@
-164,15
+181,26
@@
public class Host {
*
*/
public native double getSpeed();
*
*/
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 getCoreNumber();
+
/**
* Returns the value of a given host property.
*/
public native String getProperty(String name);
/**
* Returns the value of a given host property.
*/
public native String getProperty(String name);
+
/**
* Change the value of a given host property.
*/
public native void setProperty(String name, String value);
/**
* Change the value of a given host property.
*/
public native void setProperty(String name, String value);
- /** This method tests if a host is available.
+
+ /** This method tests if a host is available.
* @return True if the host is available.
*/
public native boolean isAvail();
* @return True if the host is available.
*/
public native boolean isAvail();