]> AND Public Git Repository - simgrid.git/blobdiff - examples/java/reservationSurfPlugin/ReservationPlugin.java
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
actually kill models' names
[simgrid.git] / examples / java / reservationSurfPlugin / ReservationPlugin.java
index 8f3b6b72bfd840d38603af248ffea4dc11a60aa5..c23c31d5de64fc698bf6382fcdedf2e884cfb99a 100644 (file)
@@ -1,3 +1,9 @@
+/* Copyright (c) 2014. 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. */
+
 package reservationSurfPlugin;
 
 import org.simgrid.surf.*;
@@ -22,7 +28,7 @@ public class ReservationPlugin extends Plugin {
   }
 
   public void updateBandwidthRoute(String src, String dst, double bandwidth){
-    NetworkLink[] route = Surf.getRoute(src, dst);
+    Link[] route = Surf.getRoute(src, dst);
     for (int i =0; i<route.length; i++){
       Msg.info("Trace: bandwidth of "+route[i].getName()+" before "+route[i].getBandwidth());
       route[i].updateBandwidth(bandwidth);//getName();
@@ -30,11 +36,11 @@ public class ReservationPlugin extends Plugin {
     }
   }
 
+  @Override
   public void networkCommunicateCallback(NetworkAction action, RoutingEdge src, RoutingEdge dst, double size, double rate){
     if (src.getName().equals(this.src) && dst.getName().equals(this.dst)) {
       action.setBound(this.bandwidth);
     }
     Msg.info("Trace: Communicate message of size "+size+" with rate "+rate+" and bound "+action.getBound()+" from "+src.getName()+" to "+dst.getName());
   }
-
 }