From: Agustín C. H. <ag...@ds...> - 2008-04-08 14:19:15
|
Hello, ?? escribió: > hello everyone: > I have build a topology of grid environment by gridsim toolkit, but I > want Gridresources comunicating with a Scheduler without network. How > can I do this? You can do this by means of events. This is, an entity extending GridUser can execute the following code: super.send(destID, GridSimTags.SCHEDULE_NOW + delay, GridSimTags.EVENT_CODE, data_object); This code sends an "EVENT_CODE" event, from he current entity to the entity "destID". The event is delivered at the destination with a "delay", and the event carries the "data_object" data. Then, in the destination entity, u must catch the event. For example, in the body method u can have something like this: ... case GridSimTags.EVENT_CODE: processEvent(ev); break; ... In the processEvent(ev); function u must get the data from the event and perform the processing u need. > In addition, is there any difference between the following constructors: > public *GridSim*(String name,double baudRate)throws Exception > public *GridSim*(String name,Link <mk:@MSITStore:D:%5C%3F%3F%5C%3F%3F%3F%3F%3F%5Cgridsim%5Chowto%5Cgridbus_gridsim_doc.chm::/www.gridbus.org/gridsim/doc/gridsim/net/Link.html> link)throws Exception There is no difference, because in the first one u provide the baud rate of a link that will be created in the method, and in the second u provide the link object already created. Hope this helps. If u have any doubt, don't hesitate and ask us again. All the best, Agustin > thank you. > ------------------------------------------------------------------------ > ken from njupt > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Register now and save $200. Hurry, offer ends at 11:59 p.m., > Monday, April 7! Use priority code J8TLD2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > ------------------------------------------------------------------------ > > _______________________________________________ > Gridsim-users mailing list > Gri...@li... > https://lists.sourceforge.net/lists/listinfo/gridsim-users > -- =============================================== Agustin Caminero PhD Student Computing Systems Department The University of Castilla La Mancha, Albacete. Spain. Phone: +34 967 599 200 Ext. 2693. Fax: +34 967 599 343 http://www.i3a.uclm.es/ =============================================== |