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

📄 gridsimtags.java

📁 一个非常著名的网格模拟器,能够运行网格调度算法!
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/* * 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 * * $Id: GridSimTags.java,v 1.46 2006/02/16 01:39:26 anthony Exp $ */package gridsim;/** * Contains various static command tags that indicate a type of action that * needs to be undertaken by GridSim entities when they receive or send events. * <br> * <b>NOTE:</b> To avoid conflicts with other tags, GridSim reserves negative * numbers, 0 - 299, and 9600. * * @author       Manzur Murshed and Rajkumar Buyya * @since        GridSim Toolkit 1.0 * @invariant $none */public class GridSimTags{    // starting constant value for grid-related tags    private static final int BASE = 0;    // starting constant value for network-related tags    private static final int NETBASE = 100;    // starting constant value for AR-related tags (also negative numbers)    private static final int ARBASE = 200;    //////////////////////////////////////////////////////////////////////    /** Denotes boolean <tt>true</tt> in <tt>int</tt> value */    public static final int TRUE = 1;    /** Denotes boolean <tt>false</tt> in <tt>int</tt> value */    public static final int FALSE = 0;    /** Denotes the default baud rate for some GridSim entities */    public static final int DEFAULT_BAUD_RATE = 9600;    /** Schedules an entity without any delay */    public static final double SCHEDULE_NOW = 0.0;    /** Denotes the end of simulation */    public static final int END_OF_SIMULATION = -1;    //////////////////////////////////////////////////////////////////////    /**     * Denotes insignificant simulation entity or time. This tag will not be     * used for identification purposes.     */    public static final int INSIGNIFICANT = BASE + 0;    /** Sends an Experiment object between UserEntity and Broker entity */    public static final int EXPERIMENT = BASE + 1;    /**     * Denotes a grid resource to be registered. This tag is normally used     * between GridInformationService and GridResouce entity.     */    public static final int REGISTER_RESOURCE = BASE + 2;    /**     * Denotes a grid resource, that can support advance reservation, to be     * registered. This tag is normally used between     * GridInformationService and GridResouce entity.     */    public static final int REGISTER_RESOURCE_AR = BASE + 3;    /**     * Denotes a list of all resources, including the ones that can support     * advance reservation. This tag is normally used between     * GridInformationService and GridSim entity.     */    public static final int RESOURCE_LIST = BASE + 4;    /**     * Denotes a list of resources that only support     * advance reservation. This tag is normally used between     * GridInformationService and GridSim entity.     */    public static final int RESOURCE_AR_LIST = BASE + 5;    /**     * Denotes grid resource characteristics information. This tag is normally     * used between GridSim and GridResource entity.     */    public static final int RESOURCE_CHARACTERISTICS = BASE + 6;    /**     * Denotes grid resource allocation policy. This tag is normally     * used between GridSim and GridResource entity.     */    public static final int RESOURCE_DYNAMICS = BASE + 7;    /**     * Denotes a request to get the total number of Processing Elements (PEs)     * of a resource. This tag is normally used between GridSim and GridResource     * entity.     */    public static final int RESOURCE_NUM_PE = BASE + 8;    /**     * Denotes a request to get the total number of free Processing Elements     * (PEs) of a resource. This tag is normally used between GridSim and     * GridResource entity.     */    public static final int RESOURCE_NUM_FREE_PE = BASE + 9;    /**     * Denotes a request to record events for statistical purposes. This tag is     * normally used between GridSim and GridStatistics entity.     */    public static final int RECORD_STATISTICS = BASE + 10;    /** Denotes a request to get a statistical list. */    public static final int RETURN_STAT_LIST = BASE + 11;    /**     * Denotes a request to send an Accumulator object based on category into     * an event scheduler. This tag is normally used between ReportWriter and     * GridStatistics entity.     */    public static final int RETURN_ACC_STATISTICS_BY_CATEGORY = BASE + 12;    /** Denotes a request to register a GridResource entity to a regional     * GridInformationService (GIS) entity     */    public static final int REGISTER_REGIONAL_GIS = BASE + 13;    /** Denotes a request to get a list of other regional GIS entities     * from the system GIS entity     */    public static final int REQUEST_REGIONAL_GIS = BASE + 14;    /////////////////////////////////////////////////////////////    /** Signal used by Entities to connect to Routers using a link. */    public static final int REGISTER_LINK = NETBASE + 0;    /** This is used by a router when it wants to connect with another router.*/    public static final int REGISTER_ROUTER = NETBASE + 1;    /** All NetPackets are routed through the network with this tag. */    public static final int PKT_FORWARD = NETBASE + 2;    /** This is used by Routers to send route advertisements. */    public static final int ROUTER_AD = NETBASE + 3;    /** This tag is used by Output class to time its packet sendings. */    public static final int SEND_PACKET = NETBASE + 4;    /** This tag is used by an entity to send ping requests */    public static final int INFOPKT_SUBMIT = NETBASE + 5;    /** This tag is used to return the ping request back to sender */    public static final int INFOPKT_RETURN = NETBASE + 6;    /**     * This tag is used to identify a packet as a junk packet used for     * background traffic     */    public static final int JUNK_PKT = NETBASE + 7;    /** Denotes that this packet is empty. This tag     * is used internally by {@link gridsim.net.Input} and     * {@link gridsim.net.Output} entities.     */    public static final int EMPTY_PKT = NETBASE + 8;    /** Denotes that this packet will be sent to a packet scheduler by a router     * for enqueing.     * This tag is used by a router to an active packet scheduler, such as     * the {@link gridsim.net.RateControlledScheduler} entity.     */    public static final int SCHEDULER_ENQUE = NETBASE + 9;    /** Denotes that this packet will be sent by a packet scheduler to a router     * for dequeing.     * This tag is used by an active packet scheduler, such as     * the {@link gridsim.net.RateControlledScheduler} entity to a router.     */    public static final int SCHEDULER_DEQUE = NETBASE + 10;    /////////////////////////////////////////////////////////////    // I intentionally put a gap to incorporate future tags    // so I don't have to change the numbers!    /**     * Denotes the return of a Gridlet back to sender. This tag is     * normally used by GridResource entity.     */    public static final int GRIDLET_RETURN = BASE + 20;    /**     * Denotes the submission of a Gridlet. This tag is normally     * used between GridSim User and GridResource entity.     */    public static final int GRIDLET_SUBMIT = BASE + 21;    /**     * Denotes the submission of a Gridlet with an acknowledgement.     * This tag is normally used between GridSim User and GridResource entity.     */    public static final int GRIDLET_SUBMIT_ACK = BASE + 22;    /** Cancels a Gridlet submitted in the GridResource entity. */    public static final int GRIDLET_CANCEL = BASE + 23;    /** Denotes the status of a Gridlet. */    public static final int GRIDLET_STATUS = BASE + 24;    /** Pauses a Gridlet submitted in the GridResource entity. */    public static final int GRIDLET_PAUSE = BASE + 25;    /** Pauses a Gridlet submitted in the GridResource entity with an     * acknowledgement.     */    public static final int GRIDLET_PAUSE_ACK = BASE + 26;    /** Resumes a Gridlet submitted in the GridResource entity. */    public static final int GRIDLET_RESUME = BASE + 27;    /** Resumes a Gridlet submitted in the GridResource entity with an     * acknowledgement.     */    public static final int GRIDLET_RESUME_ACK = BASE + 28;    /** Moves a Gridlet to another GridResource entity. */    public static final int GRIDLET_MOVE = BASE + 29;    /** Moves a Gridlet to another GridResource entity with an acknowledgement.     */    public static final int GRIDLET_MOVE_ACK = BASE + 30;    ///////////////////////////////////////////////////////////////    // The below tags are sent by AdvanceReservation to ARGridResource class    /**     * Commits a reservation <b>without</b> any Gridlets attached.     * This tag is sent by AdvanceReservation to ARGridResource class.     */    public static final int SEND_AR_COMMIT_ONLY = ARBASE + 1;    /**     * Commits a reservation <b>with</b> one or more Gridlets attached.     * This tag is sent by AdvanceReservation to ARGridResource class.     */    public static final int SEND_AR_COMMIT_WITH_GRIDLET = ARBASE + 2;    /**     * Requests for a new <b>advanced</b> reservation.     * This tag is sent by AdvanceReservation to ARGridResource class.     */    public static final int SEND_AR_CREATE = ARBASE + 3;    /**     * Requests for a new <b>immediate</b> reservation.     * This tag is sent by AdvanceReservation to ARGridResource class.     */    public static final int SEND_AR_CREATE_IMMEDIATE = ARBASE + 4;    /**     * Cancels an existing reservation.     * This tag is sent by AdvanceReservation to ARGridResource class.     */    public static final int SEND_AR_CANCEL = ARBASE + 5;    /**     * Requests a list of busy time of a resource.     * This tag is sent by AdvanceReservation to ARGridResource class.     */    public static final int SEND_AR_LIST_BUSY_TIME = ARBASE + 6;    /**     * Requests a list of free or empty time of a resource.     * This tag is sent by AdvanceReservation to ARGridResource class.     */    public static final int SEND_AR_LIST_FREE_TIME = ARBASE + 7;    /**     * Queries the current status of a reservation.     * This tag is sent by AdvanceReservation to ARGridResource class.     */    public static final int SEND_AR_QUERY = ARBASE + 8;    /**     * Modifies an existing reservation.     * This tag is sent by AdvanceReservation to ARGridResource class.     */    public static final int SEND_AR_MODIFY = ARBASE + 9;    ///////////////////////////////////////////////////////////////    // Below denotes the status of a reservation during its lifetime.    // This answer is given in reply to    // AdvanceReservation.queryReservation() method.    /** The reservation has not yet begun, i.e. the current simulation time is     * before the start time.     * This tag is sent by a resource or allocation policy to AdvanceReservation     * class.     */    public static final int AR_STATUS_NOT_STARTED = ARBASE + 10;    /**     * The reservation has been accepted by a resource, but not yet been     * committed by a user.     * This tag is sent by a resource or allocation policy to AdvanceReservation     * class.     */    public static final int AR_STATUS_NOT_COMMITTED = ARBASE + 11;    /**     * The reservation has been canceled by a user during execution or active     * session.     * This tag is sent by a resource or allocation policy to AdvanceReservation     * class.     */    public static final int AR_STATUS_TERMINATED = ARBASE + 12;    /** The reservation has begun and is currently being executed by a     * destinated GridResource entity.     * This tag is sent by a resource or allocation policy to AdvanceReservation     * class.     */    public static final int AR_STATUS_ACTIVE = ARBASE + 13;    /** The reservation has been completed.     * This tag is sent by a resource or allocation policy to AdvanceReservation     * class.     */    public static final int AR_STATUS_COMPLETED = ARBASE + 14;    /** The reservation has been canceled before activation.     * This tag is sent by a resource or allocation policy to AdvanceReservation     * class.     */    public static final int AR_STATUS_CANCELED = ARBASE + 15;    /**     * The reservation has passed its expiry time before being committed.     * Hence, a resource will not execute this reservation.     * This tag is sent by a resource or allocation policy to AdvanceReservation     * class.     */    public static final int AR_STATUS_EXPIRED = ARBASE + 16;    /**     * The reservation booking ID is invalid.     * This tag is sent by a resource or allocation policy to AdvanceReservation     * class.     */    public static final int AR_STATUS_ERROR_INVALID_BOOKING_ID = ARBASE + 17;    /**     * The reservation booking ID does not exist.     * This tag is sent by a resource or allocation policy to AdvanceReservation     * class.     */    public static final int AR_STATUS_RESERVATION_DOESNT_EXIST = ARBASE + 18;    /**     * Unknown error happens.     * This tag is sent by a resource or allocation policy to AdvanceReservation     * class.     */    public static final int AR_STATUS_ERROR = ARBASE + 19;    ///////////////////////////////////////////////////////////////    // The below tags are used in reply to    // AdvanceReservation.cancelReservation() method.    // These tags are sent by a resource or allocation policy.    /**     * Cancellation of a reservation fails.     * This tag is sent by a resource or allocation policy to     * AdvanceReservation entity.     */    public static final int AR_CANCEL_FAIL = ARBASE + 20;    /**     * Cancellation of a reservation fails due to invalid booking ID.     * This tag is sent by a resource or allocation policy to     * AdvanceReservation entity.     */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -