Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Also remove the pseudo-specific task type for this example (since it's also empty)
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sat, 27 Feb 2010 23:06:02 +0000 (23:06 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sat, 27 Feb 2010 23:06:02 +0000 (23:06 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7134 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/java/comm_time/CommTimeTask.java [deleted file]
examples/java/comm_time/Makefile.am
examples/java/comm_time/Master.java
examples/java/comm_time/MyTask.java [deleted file]
examples/java/comm_time/Slave.java

diff --git a/examples/java/comm_time/CommTimeTask.java b/examples/java/comm_time/CommTimeTask.java
deleted file mode 100644 (file)
index 1890530..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * $Id$
- *
- * Copyright 2006,2007 Martin Quinson, Malek Cherier         
- * All rights reserved. 
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. 
- */
-
-import simgrid.msg.*;
-
-public class CommTimeTask extends Task {
-       
-   private double timeVal;
-       
-   public CommTimeTask(String name, double computeDuration, double messageSize) throws JniException, NativeException{
-      super(name,computeDuration,messageSize);
-   }
-       
-   public void setTime(double timeVal){
-      this.timeVal = timeVal;
-   }
-   
-   public double getTime() {
-      return this.timeVal;
-   }
-}
-    
\ No newline at end of file
index 10b4b5b..a87ab18 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2004-2007. The SimGrid team. All right reserved.
+# Copyright (c) 2004-2010. The SimGrid team. All right reserved.
 
 # This file is part of the SimGrid project. This is free software:
 # You can redistribute and/or modify it under the terms of the
 
 # This file is part of the SimGrid project. This is free software:
 # You can redistribute and/or modify it under the terms of the
@@ -8,8 +8,7 @@
 EXTRA_DIST=comm_time_deployment.xml comm_time_platform.xml
 
 # Declare sources:
 EXTRA_DIST=comm_time_deployment.xml comm_time_platform.xml
 
 # Declare sources:
-JAVA_SRC=Master.java Slave.java CommTimeTest.java \
-         MyTask.java FinalizeTask.java
+JAVA_SRC=Master.java Slave.java CommTimeTest.java FinalizeTask.java
 JAVA_TESTS=CommTimeTest.class
 TESTS=$(JAVA_TESTS)
 
 JAVA_TESTS=CommTimeTest.class
 TESTS=$(JAVA_TESTS)
 
index 8343873..7f3b5c7 100644 (file)
@@ -25,7 +25,7 @@ public class Master extends simgrid.msg.Process {
       Msg.info("Hello! Got "+  slavesCount + " slaves and "+tasksCount+" tasks to process");
       
       for (int i = 0; i < tasksCount; i++) {
       Msg.info("Hello! Got "+  slavesCount + " slaves and "+tasksCount+" tasks to process");
       
       for (int i = 0; i < tasksCount; i++) {
-        MyTask task = new MyTask("Task_" + i, taskComputeSize, taskCommunicateSize);
+        Task task = new Task("Task_" + i, taskComputeSize, taskCommunicateSize);
         if (i%1000==0)
           Msg.info("Sending \"" + task.getName()+ "\" to \"slave_" + i % slavesCount + "\"");
         task.send("slave_"+(i%slavesCount));
         if (i%1000==0)
           Msg.info("Sending \"" + task.getName()+ "\" to \"slave_" + i % slavesCount + "\"");
         task.send("slave_"+(i%slavesCount));
diff --git a/examples/java/comm_time/MyTask.java b/examples/java/comm_time/MyTask.java
deleted file mode 100644 (file)
index 633ab00..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * $Id$
- *
- * Copyright 2006,2007,2010 The SimGrid Team. All rights reserved. 
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. 
- */
-
-import simgrid.msg.*;
-
-public class MyTask extends Task {
-       
-   private double timeVal;
-       
-   public MyTask(String name, double computeDuration, double messageSize) throws JniException, NativeException{
-      super(name,computeDuration,messageSize);
-   }
-       
-   public void setTime(double timeVal){
-      this.timeVal = timeVal;
-   }
-   
-   public double getTime() {
-      return this.timeVal;
-   }
-}
-    
\ No newline at end of file
index 7a7ace7..e9069ad 100644 (file)
@@ -21,14 +21,12 @@ public class Slave extends simgrid.msg.Process {
       Msg.info("Receiving on 'slave_"+num+"'");
       
       while(true) { 
       Msg.info("Receiving on 'slave_"+num+"'");
       
       while(true) { 
-        Task t = Task.receive("slave_"+num);   
+        Task task = Task.receive("slave_"+num);        
         
         
-        if (t instanceof FinalizeTask) {
+        if (task instanceof FinalizeTask) {
            break;
         }
            break;
         }
-        MyTask task = (MyTask)t;
         task.execute();
         task.execute();
-//      Msg.info("\"" + task.getName() + "\" done ");
        }
        
       Msg.info("Received Finalize. I'm done. See you!");
        }
        
       Msg.info("Received Finalize. I'm done. See you!");