亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? datagridresource.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 */package gridsim.datagrid;import eduni.simjava.Sim_event;import gridsim.datagrid.index.*;import gridsim.datagrid.storage.*;import gridsim.*;import gridsim.net.Link;import java.util.List;/** * A resource for Data Grids enables users to run their jobs as well as to * gain access to available data sets. * A Data Grid resource has the following components: * <ul> * <li><b>Storage:</b> A resource can have one or more different storage * elements, such as harddisks or tape drives. An individual storage is * responsible for storing, retrieving and deleting files. * <br><br> * <li><b>Replica Manager:</b> This component is responsible for handling * and managing incoming requests about data sets in a resource for one or * more storage elements. It also performs registrations of files stored in * the resource to a designated RC. * <br><br> * <ul><b>Local Replica Catalogue (RC):</b> This component is an optional part * of a resource. The Local RC is responsible for indexing available files on * the resource only. It also handles users' queries. However, the Local RC * does not serve as a catalogue server to other resources. * This should be done by a leaf or regional RC. * <br><br> * <li><b>Allocation Policy:</b> This component is responsible for executing * user jobs to one or more available nodes in a resource. * </ul> * * @author  Uros Cibej and Anthony Sulistio * @since   GridSim Toolkit 4.0 * @see gridsim.datagrid.storage.Storage * @see gridsim.datagrid.ReplicaManager * @see gridsim.datagrid.index.AbstractRC * @see gridsim.AllocPolicy */public class DataGridResource extends GridResource{    private ReplicaManager replicaManager_;    private String rcName_;     // a replica catalogue entity name    private int rcID_;          // a replica catalogue entity ID    private int tierLevel_;     // tier level of this resource    private RegionalRC localRC_;     // local RC entity    /**     * Creates a new DataGrid resource object     * @param name       the name to be associated with this entity (as     *                   required by Sim_entity class from simjava package)     * @param link       the link that will be used to connect this     *                   resource to another Entity or Router.     * @param resource   an object of ResourceCharacteristics     * @param calendar   an object of ResourceCalendar     * @param replicaManager    a Replica Manager that is responsible for this     *                          resource     * @throws Exception This happens when one of the following scenarios occur:     *      <ul>     *          <li> creating this entity before initializing GridSim package     *          <li> this entity name is <tt>null</tt> or empty     *          <li> the given Replica Manager object is <tt>null</tt>     *          <li> this entity has <tt>zero</tt> number of PEs (Processing     *              Elements). <br>     *              No PEs mean the Gridlets can't be processed.     *              A resource must contain one or more Machines.     *              A Machine must contain one or more PEs.     *      </ul>     * @see gridsim.GridSim#init(int, Calendar, boolean, String[], String[],     *          String)     */    public DataGridResource(String name, Link link,            ResourceCharacteristics resource, ResourceCalendar calendar,            ReplicaManager replicaManager)            throws Exception    {        super(name, link, resource, calendar);        if (replicaManager == null)        {            throw new ParameterException(name +                ": Error - the Replica Manager entity is null");        }        init(replicaManager);    }    /**     * Creates a new DataGrid resource object     * @param name       the name to be associated with this entity (as     *                   required by Sim_entity class from simjava package)     * @param link       the link that will be used to connect this     *                   resource to another Entity or Router.     * @param resource   an object of ResourceCharacteristics     * @param calendar   an object of ResourceCalendar     * @param policy     a scheduling policy for this Grid resource.     * @param replicaManager    a Replica Manager that is responsible for this     *                          resource     * @throws Exception This happens when one of the following scenarios occur:     *      <ul>     *          <li> creating this entity before initializing GridSim package     *          <li> this entity name is <tt>null</tt> or empty     *          <li> the given Replica Manager object is <tt>null</tt>     *          <li> this entity has <tt>zero</tt> number of PEs (Processing     *              Elements). <br>     *              No PEs mean the Gridlets can't be processed.     *              A resource must contain one or more Machines.     *              A Machine must contain one or more PEs.     *      </ul>     * @see gridsim.GridSim#init(int, Calendar, boolean, String[], String[],     *          String)     */    public DataGridResource(String name, Link link,            ResourceCharacteristics resource, ResourceCalendar calendar,            AllocPolicy policy, ReplicaManager replicaManager)            throws Exception    {        super(name, link, resource, calendar, policy);        if (replicaManager == null)        {            throw new ParameterException(name +                ": Error - the Replica Manager entity is null");        }        init(replicaManager);    }    /**     * Initializes all local attributes     * @param replicaManager    a Replica Manager object     */    private void init(ReplicaManager replicaManager)    {        rcID_ = -1;        tierLevel_ = 0;        localRC_ = null;        replicaManager_ = replicaManager;        replicaManager_.init( super.output, policy_, super.get_id() );    }    /**     * Adds one or more Storage elements into the resource.     * @param storageList   a list of Storage elements     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     * @see gridsim.datagrid.storage.Storage     */    public boolean addStorage(List storageList)    {        if (storageList == null) {            return false;        }        return replicaManager_.addStorage(storageList);    }    /**     * Adds a Storage element     * @param storage   a Storage element     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     * @see gridsim.datagrid.storage.Storage     */    public boolean addStorage(Storage storage)    {        if (storage == null) {            return false;        }        return replicaManager_.addStorage(storage);    }    /**     * Gets the total capacity of all Storage elements (in MByte)     * @return  the total capacity in MB     */    public double getTotalStorageCapacity() {        return replicaManager_.getTotalStorageCapacity();    }    /**     * Adds a file into the resource's storage before the experiment starts.     * If the file is a master file, then it will be registered to the RC when     * the experiment begins.     * @param file  a DataGrid file     * @return a tag number denoting whether this operation is a success or not     * @see gridsim.datagrid.DataGridTags#FILE_ADD_SUCCESSFUL     * @see gridsim.datagrid.DataGridTags#FILE_ADD_ERROR_EMPTY     */    public int addFile(File file)    {        if (file == null) {            return DataGridTags.FILE_ADD_ERROR_EMPTY;        }        return replicaManager_.addFile(file);    }    /**     * Sets the RC name that is located outside this resource.     * This method should be used if a local RC exists.     * @param rcName    a RC entity name     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public boolean setHigherReplicaCatalogue(String rcName)    {        // if a local RC already exists, then exit        if (localRC_ == null)        {            System.out.println(super.get_name() +                ".setHigherReplicaCatalogue(): Warning - a local " +                "Replica Catalogue entity doesn't exist.");            return false;        }        if (rcName == null || GridSim.getEntityId(rcName) == -1) {            return false;        }        localRC_.setHigherLevelRCid( GridSim.getEntityId(rcName) );        return true;    }    /**     * Sets the RC name for this resource.     * This method should be used if a local RC DOES NOT exist.     * @param rcName    a RC entity name     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public boolean setReplicaCatalogue(String rcName)    {        // if a local RC already exists, then exit        if (localRC_ != null)        {            System.out.println(super.get_name() +                ".setReplicaCatalogue(): Warning - a local " +                "Replica Catalogue entity already exists.");            return false;        }        if (rcName == null || GridSim.getEntityId(rcName) == -1) {            return false;        }        rcName_ = rcName;        rcID_ = GridSim.getEntityId(rcName);        return replicaManager_.setReplicaCatalogue(rcID_);    }    /**     * Sets the RC entity for this resource.     * This method should be used if a local RC DOES NOT exist.     * @param rc    a RC entity     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public boolean setReplicaCatalogue(AbstractRC rc)    {        // if a local RC already exists, then exit        if (localRC_ != null || rc == null) {            return false;        }        return setReplicaCatalogue( rc.get_name() );    }   /**    * Creates a new local RC, meaning it is located inside this resource.    * Hence, this local RC is using I/O of the resource.    * Therefore, to communicate to this local RC, an entity will need to send    * an event to the resource, then the resource will pass the event to the    * local RC.    * @return <tt>true</tt> if successful, <tt>false</tt> otherwise    */    public boolean createLocalRC()    {        // if a local RC already exists        if (localRC_ != null)        {            System.out.println(super.get_name() + ".setLocalRC(): Warning - " +                "a local Replica Catalogue entity already exists.");            return false;        }        // if a RC has already assigned/allocated for this resource        if (rcID_ != -1 || super.output == null)        {            System.out.println(super.get_name() + ".setLocalRC(): Warning - " +                "a regional Replica Catalogue entity is already allocated " +                "to this resource.");            return false;        }        boolean result = false;        try        {            String name = super.get_name() + "_localRC";            localRC_ = new RegionalRC(name, super.get_id(), super.output);            // RM has to be aware that the RC is now on the local site            replicaManager_.setReplicaCatalogue( super.get_id() );            rcID_ = super.get_id();            result = true;        }        catch (Exception e) {            result = false;        }        return result;    }    /**     * Checks whether this resource has a local RC entity or not.     * @return <tt>true</tt> if this resource has a local RC entity,     *         <tt>false</tt> otherwise     */    public boolean hasLocalRC()    {        boolean result = false;        if (localRC_ != null) {            result = true;        }        return result;    }    /**     * Gets the local RC entity of this resource.     * @return the local replica catalogue if it exists, or     *         <tt>null</tt> otherwise     */    public AbstractRC getLocalRC() {       return localRC_;    }    /**     * Sets the tier level of this resource (in a hierarchical model)     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public boolean setTierLevel(int tierLevel)    {        if (tierLevel < 0) {            return false;        }        tierLevel_ = tierLevel;        return true;    }    /**     * Processes events or services that are available for this resource     * @param ev    a Sim_event object     */    protected void processOtherEvent(Sim_event ev)    {        boolean result = false;        // then process at local RC if previously not available        if (localRC_ != null) {            result = localRC_.processEvent(ev);        }        // process this event at data manager        if (result == false) {            result = replicaManager_.processEvent(ev);        }        if (result == false)        {            System.out.println(super.get_name() +                ".body(): Unable to handle a request from " +                GridSim.getEntityName( ev.get_src() ) +                " with event tag = " + ev.get_tag() );        }    }    /**     * Registers other entities when a simulation starts. In this case,     * all master files are being registered by RM to the designated RC.     * @see gridsim.datagrid.ReplicaManager#registerAllMasterFiles()     */    protected void registerOtherEntity()    {        // if no RC entity has been created before the start of simulation        // then create a local RC entity by default        if (rcID_ == -1 && localRC_ == null) {            createLocalRC();        }        // wait for the routers to build their routing tables        super.sim_process(GridSim.PAUSE);        replicaManager_.registerAllMasterFiles();    }    /**     * Notifies internal entities regarding to the end of simulation signal     */    protected void processEndSimulation() {        replicaManager_.processEndSimulation();    }} // end class

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产**成人网毛片九色| 欧美性生活久久| 麻豆精品在线观看| 美女网站在线免费欧美精品| 美女在线观看视频一区二区| 成熟亚洲日本毛茸茸凸凹| 一本久久精品一区二区| 欧美日韩国产综合一区二区 | 欧美日本精品一区二区三区| 欧美一区二区三区四区高清| 日韩午夜中文字幕| 亚洲欧美一区二区三区国产精品| 性做久久久久久久久| 久久成人免费日本黄色| 一本大道av一区二区在线播放| 91麻豆精品国产91久久久资源速度 | 日韩免费电影网站| 国产精品乱人伦| 国产精品久久久久久福利一牛影视 | 亚洲精品成a人| 久久精品国产网站| 欧美日韩一区二区不卡| 国产欧美精品区一区二区三区 | 亚洲成人av在线电影| 国产成人一区二区精品非洲| 99综合影院在线| 精品国产亚洲在线| 日韩在线a电影| 91久久线看在观草草青青| 久久久不卡网国产精品一区| 偷拍自拍另类欧美| 色综合天天综合网国产成人综合天| 欧美精品一区二区三区高清aⅴ| 亚洲小说春色综合另类电影| 99国产精品99久久久久久| 久久精品在线观看| 亚洲一区欧美一区| 色噜噜狠狠色综合欧洲selulu| 日本一区二区视频在线| 奇米777欧美一区二区| 欧美怡红院视频| 日本一区二区成人| 国产成人av一区二区三区在线观看| 欧美精品vⅰdeose4hd| 一区二区成人在线| 91电影在线观看| 亚洲欧美偷拍另类a∨色屁股| aaa亚洲精品一二三区| 中文字幕av一区二区三区高| 国产成人av电影| 亚洲国产精品二十页| 国产精品自产自拍| 欧美极品aⅴ影院| 国产精品1区二区.| 中文字幕第一区第二区| 国产精品69久久久久水密桃 | 97久久超碰国产精品| 亚洲欧洲精品一区二区三区| 色一区在线观看| 亚洲蜜桃精久久久久久久| 欧美午夜影院一区| 亚洲成人一区在线| 欧美一区二区三区免费大片| 国产夫妻精品视频| 亚洲国产另类av| 欧美va在线播放| 99久久婷婷国产| 日韩精品国产欧美| 国产精品伦一区| 欧美一区日韩一区| 色综合天天综合网国产成人综合天 | 国产精品一区二区三区网站| 亚洲视频免费在线| 日韩免费观看2025年上映的电影| 国产91丝袜在线观看| 三级在线观看一区二区| 国产精品久久福利| 日韩欧美一区二区不卡| 色哟哟一区二区三区| 国产精品一级黄| 天天影视涩香欲综合网| 中文字幕日韩精品一区| 精品成人在线观看| 欧美日韩一区成人| 91在线精品秘密一区二区| 久久国产剧场电影| 午夜激情一区二区| 亚洲日本电影在线| 国产人成一区二区三区影院| 91精品国产综合久久蜜臀| 一本色道久久综合亚洲精品按摩 | 青娱乐精品在线视频| 中文字幕一区二区在线播放| 欧美电影免费观看高清完整版 | 91在线一区二区三区| 紧缚奴在线一区二区三区| 亚洲国产精品久久久久婷婷884 | 五月天婷婷综合| 中文字幕精品一区二区精品绿巨人 | 欧美艳星brazzers| 99精品欧美一区二区三区综合在线| 久久电影网站中文字幕| 青青草97国产精品免费观看无弹窗版| 亚洲欧美另类久久久精品| 国产欧美一区二区三区网站| 日韩精品一区二区在线| 欧美精品一二三| 欧美美女网站色| 欧美另类高清zo欧美| 欧洲视频一区二区| 色婷婷av一区二区三区gif| 成人av在线播放网站| 国产mv日韩mv欧美| 成人丝袜视频网| 成人午夜激情视频| 成人小视频免费在线观看| 国产成人免费在线观看不卡| 国产麻豆一精品一av一免费| 精品系列免费在线观看| 国内精品写真在线观看| 国产一区欧美一区| 国产精品亚洲а∨天堂免在线| 国产精品羞羞答答xxdd| www.日韩av| 日本精品视频一区二区三区| 日本精品一区二区三区四区的功能| 欧美在线观看你懂的| 欧美日韩一区二区不卡| 欧美一级夜夜爽| 欧美精品一区二| 国产女同性恋一区二区| 亚洲三级小视频| 午夜日韩在线观看| 麻豆成人免费电影| 国产成人精品aa毛片| 91视频在线观看免费| 欧美三片在线视频观看| 日韩视频免费观看高清完整版在线观看 | 日本视频一区二区三区| 精品综合久久久久久8888| 国产精品一区二区视频| 色狠狠一区二区| 91精品国产综合久久香蕉麻豆 | 一级女性全黄久久生活片免费| 亚洲一区二区免费视频| 蜜臀av一区二区三区| 成人在线一区二区三区| 欧美三级乱人伦电影| 久久久精品黄色| 亚洲人精品一区| 久久99久国产精品黄毛片色诱| 成人国产精品免费观看动漫| 欧美日韩一区二区三区高清 | 国产精品18久久久久久vr| 白白色 亚洲乱淫| 欧美久久高跟鞋激| 国产精品久久毛片a| 日韩成人伦理电影在线观看| 国产99久久久国产精品免费看 | 91福利在线看| 精品国产91亚洲一区二区三区婷婷| 国产精品久久久久久久久动漫 | 日韩一区二区三区电影在线观看 | 天天综合天天综合色| 成人黄色网址在线观看| 日韩一卡二卡三卡四卡| 综合精品久久久| 精品一二线国产| 欧美日韩的一区二区| 中文字幕永久在线不卡| 精品亚洲免费视频| 欧美日韩一区三区四区| 国产精品嫩草久久久久| 美女网站色91| 欧美日韩一本到| 国产精品国产三级国产普通话99| 免费精品视频在线| 色婷婷综合在线| 国产精品福利一区二区| 久久精品噜噜噜成人av农村| 欧美日韩亚洲另类| 亚洲美女免费在线| 成人avav影音| 国产日产精品一区| 国产剧情一区在线| 精品国产乱码久久久久久夜甘婷婷| 亚洲一区视频在线| 欧美在线|欧美| 亚洲激情在线激情| 成人久久久精品乱码一区二区三区| 精品少妇一区二区三区| 亚洲丰满少妇videoshd| 91福利社在线观看| 一区二区三区在线免费观看| 99r国产精品| 亚洲自拍偷拍九九九| 色狠狠av一区二区三区| 亚洲免费观看高清完整版在线观看熊 | 亚洲视频在线一区观看| 成人av先锋影音|