Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
New development version.
[jaceP2P.git] / src / jaceP2P / JaceP2P.java
index b089874..3322d0a 100644 (file)
@@ -29,8 +29,8 @@ public class JaceP2P {
                        if (entity.equals("-Daemon")) {
                                System.out
                                                .println("\n*************** LAUNCHING ---- DAEMON *****");
-                               JaceDaemon daemon = new JaceDaemon(superNodeName, port,
-                                               comProtocol);
+                               JaceDaemon daemon = new JaceDaemon( superNodeName, port,
+                                               comProtocol ) ;
                                daemon.initialize();
                        } else if (entity.equals("-Spawner")) {
                                if (args.length > 9) {
@@ -40,28 +40,34 @@ public class JaceP2P {
                                        int nbDaemonPerThread = -1;
                                        int nbSavingNodes = -1;
                                        int algoMapping = -1;
+                                       int test = -1 ;
                                        double paramAlgo = 0.5 ;
+                                       int nbFault = 0 ;
+                                       int faultTime = 0 ;
 
                                        try {
                                                nbDaemonPerSpawner = new Integer(args[4]).intValue();
                                                nbDaemonPerThread = new Integer(args[5]).intValue();
                                                nbSavingNodes = new Integer(args[6]).intValue();
-                                               algoMapping = new Integer(args[7]).intValue();
-                                               paramAlgo = new Double(args[8]).doubleValue();
+                                               test = new Integer(args[7]).intValue();
+                                               nbFault = new Integer(args[8]).intValue();
+                                               faultTime = new Integer(args[9]).intValue();
+                                               algoMapping = new Integer(args[10]).intValue();
+                                               paramAlgo = new Double(args[11]).doubleValue();
                                        } catch (NumberFormatException e) {
                                                System.err.println("The number of Daemons per spawner and the number of daemons per thread must be integers: "
                                                                                + e);
                                                System.exit(0);
                                        }
                                        //System.out.println("=====> " + algoMapping);
-                                       param = new String[args.length - 9];
-                                       for (int i = 9; i < args.length; i++) {
-                                               param[i - 9] = args[i];
+                                       param = new String[args.length - 12];
+                                       for (int i = 12; i < args.length; i++) {
+                                               param[i - 12] = args[i];
                                                System.out.println("=> " + args[i]);
                                        }
                                        JaceSpawner spawner = new JaceSpawner(superNodeName, port,
                                                        comProtocol, param, nbDaemonPerSpawner,
-                                                       nbDaemonPerThread, nbSavingNodes, algoMapping, paramAlgo);
+                                                       nbDaemonPerThread, nbSavingNodes, algoMapping, paramAlgo, test, nbFault, faultTime);
                                        spawner.initialize();
                                }
 
@@ -100,19 +106,19 @@ public class JaceP2P {
                System.out
                                .println("-Daemon : <option> = [superNodeName] [daemonPort] [protocol]");
                System.out
-                               .println("ex : java jaceP2P.JaceP2P -Daemon cluster1 1098 rmi");
+                               .println("ex : java jaceP2P.JaceP2P -Daemon cluster1 1099 rmi");
                System.out.println("");
                System.out
                                .println("-SNode : <option> = [superNodeName] [superNodePort] [protocol] [timeHeartBeat]");
                System.out
-                               .println("ex : java jaceP2P.JaceP2P -SNode cluster1 1098 rmi 500");
+                               .println("ex : java jaceP2P.JaceP2P -SNode cluster1 1099 rmi 500");
                System.out.println("");
                System.out
                                .println("-Spawner : <option> = [superNodeName] [SpawnerPort] [protocol] nbDaemonPerSpawner nbDaemonPerThread nbresave nbTask URLToTaskName <TaskParam>");
                System.out
-                               .println("ex : java jaceP2P.JaceP2P -Spawner cluster1 1098 rmi 8 4 3 16 http://bilbo/staff/vuillemi/java/LinSolv2 1000 0 20000 5");
+                               .println("ex : java jaceP2P.JaceP2P -Spawner cluster1 1099 rmi 8 4 3 16 http://bilbo/staff/vuillemi/java/LinSolv2 1000 0 20000 5");
                System.out
-                               .println("ex : java jaceP2P.JaceP2P -Spawner cluster1 1098 rmi 8 4 3 16 file:/home/vuillemi/java/LinSolv2 1000 0 20000 5");
+                               .println("ex : java jaceP2P.JaceP2P -Spawner cluster1 1099 rmi 8 4 3 16 file:/home/vuillemi/java/LinSolv2 1000 0 20000 5");
                System.exit(0);
        }
 }