Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Deprecate Msg.clean()
[simgrid.git] / org / simgrid / msg / Msg.java
index c9dcc48..4cbf037 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * JNI interface to C code for MSG.
  * 
- * Copyright 2006,2007,2010,2011 The SimGrid Team.           
+ * Copyright 2006-2012 The SimGrid Team.           
  * All right reserved. 
  *
  * This program is free software; you can redistribute 
@@ -24,37 +24,40 @@ public final class Msg {
                        System.exit(1);
                }
        }
-
-       /** Everything is right. Keep on going the way ! */
-       public static final int SUCCESS = 0;
-
-       /** Something must be not perfectly clean (but I may be paranoid freak...) */
-       public static final int WARNING = 1;
-
-       /** There has been a problem during your task transfer.
-        *  Either the network is  down or the remote host has been shutdown */
-       public static final int TRANSFERT_FAILURE = 2;
-
-       /** System shutdown. 
-        *  The host on which you are running has just been rebooted.
-        *  Free your data structures and return now ! */
-       public static final int HOST_FAILURE = 3;
-
-       /** Canceled task. This task has been canceled by somebody ! */
-       public static final int TASK_CANCELLLED = 4;
-
-       /** You've done something wrong. You'd better look at it... */
-       public static final int FATAL_ERROR = 5;
-
     /** Retrieve the simulation time
      * @return
      */
        public final static native double getClock();
+       /**
+        * Issue a debug logging message.
+        * @param s message to log.
+        */
+       public final static native void debug(String s);
+       /**
+        * Issue an verbose logging message.
+        * @param s message to log.
+        */
+       public final static native void verb(String s);
 
-    /** Issue an information logging message
+       /** Issue an information logging message
      * @param s
      */
        public final static native void info(String s);
+       /**
+        * Issue an warning logging message.
+        * @param s message to log.
+        */
+       public final static native void warn(String s);
+       /**
+        * Issue an error logging message.
+        * @param s message to log.
+        */
+       public final static native void error(String s);
+       /**
+        * Issue an critical logging message.
+        * @param s message to log.
+        */
+       public final static native void critical(String s);
 
        /*********************************************************************************
         * Deployment and initialization related functions                               *
@@ -81,18 +84,9 @@ public final class Msg {
         */
        public final static native void run() ;
        
-       /**
-        * Cleanup the MSG simulation.
-        * 
-        * This function is only useful if you want to chain the simulations within 
-        * the same environment. But actually, it's not sure at all that cleaning the 
-        * JVM is faster than restarting a new one, so it's probable that using this 
-        * function is not a brilliant idea. Do so at own risk.
-        *      
-        * @see                    MSG_clean
-        */
-       public final static native void clean();
-       
+       /** This function is useless nowadays, just stop calling it. */
+       @Deprecated
+       public final static void clean(){}
 
        /**
         * The native implemented method to create the environment of the simulation.