⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dummyuser.java

📁 中間件開發详细说明:清华大学J2EE教程讲义(ppt)-Tsinghua University J2EE tutorial lectures (ppt) [上载源码成为会员下载此源码] [成为VIP会
💻 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 + -