Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar, damnit
[simgrid.git] / src / bindings / java / org / simgrid / msg / Host.java
index bf2b589..4676242 100644 (file)
@@ -133,7 +133,16 @@ public class Host {
        /** This methods returns the list of storages (names) attached to an host */
        public native String[] getAttachedStorage();
 
-       /** Returns the amount of Joules consumed by that host so far */
+       /** After this call, sg_host_get_consumed_energy() will not interrupt your process
+        * (until after the next clock update).
+        */
+       public static native void updateAllEnergyConsumptions();
+       /** Returns the amount of Joules consumed by that host so far 
+        *
+        * Please note that since the consumption is lazily updated, it may require a simcall to update it.
+        * The result is that the actor requesting this value will be interrupted,
+        * the value will be updated in kernel mode before returning the control to the requesting actor.
+        */
        public native double getConsumedEnergy();
        
        /** Returns the current pstate */
@@ -148,7 +157,7 @@ public class Host {
        
 
        /** Class initializer, to initialize various JNI stuff */
-       public static native void nativeInit();
+       private static native void nativeInit();
        static {
                nativeInit();
        }