?? dummyuser.java
字號:
/* * Title: GridSim Toolkit * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation * of Parallel and Distributed Systems such as Clusters and Grids * Licence: GPL - http://www.gnu.org/copyleft/gpl.html */import gridsim.GridSim;import gridsim.datagrid.DataGridUser;import gridsim.net.SimpleLink;/** * In this example, a user does not perform any activities. * This example only shows how to create a DataGrid resource. * @author Uros Cibej and Anthony Sulistio */public class DummyUser extends DataGridUser { // constructor DummyUser(String name, double baud_rate, double delay, int MTU) throws Exception { super(name, new SimpleLink(name + "_link", baud_rate, delay, MTU)); } /** * The core method that handles communications among GridSim entities. */ public void body() { // A real user would at this point execute some activities, such as // make a query about file locations, request a file, replicate a file. System.out.println(super.get_name() + " idling ...."); // At the end, it is necessary to shutdown all the entities // shut down I/O ports shutdownUserEntity(); terminateIOEntities(); System.out.println(super.get_name() + ": %%%% Exiting body() at time " + GridSim.clock()); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -