예제 #1
0
 protected void initializeSEs() {
   for (int i = 0; i < this.getNumSEs(); i++) {
     GridElement storageElement = (GridElement) Sim_system.get_entity("SE_" + i);
     this.mapSEs.put(storageElement.get_id(), storageElement.getExternalRouter());
     this.getSEs().add(storageElement);
   }
 }
예제 #2
0
  public void createAndAttachSEs() throws Exception {
    if (this.getNetworkType() == VirtualOrganization.NT_STATIC) {
      int N = this.getTopology().getNumRouters();
      int index;
      for (int i = 0; i < this.getNumSEs(); i++) {
        index = i % N;
        RIPRouter router = (RIPRouter) Sim_system.get_entity("ROUTER_" + index);
        Link link = LinkFactory.GELink(false);
        GridElement storageElement =
            this.seFactory.create(this.isFixedInfrastructure(), i, link, true);

        storageElement.attachRouter(router);
      }
    } else {
      @SuppressWarnings("unused")
      Uniform_int r = new Uniform_int("createAndAttachSEs");
      int N = this.getTopology().getNumRouters();
      int index;
      for (int i = 0; i < this.getNumSEs(); i++) {
        index = i % N;
        RIPRouter router = (RIPRouter) Sim_system.get_entity("ROUTER_" + index);
        Link link = LinkFactory.GELink(false);
        GridElement storageElement =
            this.seFactory.create(this.isFixedInfrastructure(), i, link, true);

        storageElement.attachRouter(router);
      }
    }
  }
예제 #3
0
 protected void initializeCEs() {
   @SuppressWarnings("unused")
   int N = this.getTopology().getNumRouters();
   for (int i = 0; i < this.getNumCEs(); i++) {
     GridElement computingElement = (GridElement) Sim_system.get_entity("CE_" + i);
     this.mapCEs.put(computingElement.get_id(), computingElement.getExternalRouter());
     this.getCEs().add(computingElement);
   }
 }