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

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

?? replicamanager.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 gridsim.datagrid.storage.*;import eduni.simjava.*;import gridsim.*;import gridsim.net.Link;import java.util.List;import java.util.Iterator;/** * This is an abstract class which describes the basic functionality of a * Replica Manager in a Data Grid. This class is responsible for all data * manipulation on a DataGridResource. * * @author  Uros Cibej and Anthony Sulistio * @since   GridSim Toolkit 4.0 */public abstract class ReplicaManager extends Sim_entity{    /** The policy of the DataGridResource */    protected AllocPolicy policy_;    /**  The output port of the DataGridResource */    protected Sim_port outputPort_;    /** ID of the DataGridResource entity */    protected int resourceID_;    /** ID of the DataGridResource entity (in Integer object) */    protected Integer resIdObj_;    /** ID of the Replica Catalogue entity */    protected int rcID_;    /** List of all storage elements */    protected List storageList_;    /**     * Creates a new Replica Manager object     * @param name          the name to be associated with this entity     * @param resourceName  the name of the DataGrid resource     * @throws Exception This happens when one of the following scenarios occur:     *      <ul>     *          <li> creating this entity before initializing GridSim package     *          <li> the given name is <tt>null</tt> or empty     *      </ul>     * @see gridsim.GridSim#init(int, Calendar, boolean, String[], String[],     *          String)     */    protected ReplicaManager(String name, String resourceName)                             throws ParameterException    {        super(name);        if (resourceName == null) {            throw new ParameterException("ReplicaManager: Error - invalid name");        }        commonInit();    }    /** Initializes all attributes */    private void commonInit()    {        resourceID_ = -1;        resIdObj_ = null;        rcID_ = -1;    }    /**     * Notifies internal entities regarding to the end of simulation signal.     * This method should be overridden by the child class.     */    public void processEndSimulation() {        // ....    }    /**     * Initializes the Replica Manager details. This method is called by     * a DataGrid resource entity.     * @param output  the output port of a resource which is used to sent     *                events to other entities     * @param policy  the resource scheduling policy for executing incoming     *                Gridlets     * @param resourceID    the resource ID on which the ResourceManager is     *                      located     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     * @see gridsim.datagrid.DataGridResource     */    public boolean init(Sim_port output, AllocPolicy policy, int resourceID)    {        if (output == null || policy == null || resourceID < 0) {            return false;        }        outputPort_ = output;        policy_ = policy;        resourceID_ = resourceID;        resIdObj_ = new Integer(resourceID);        return true;    }    /**     * Sets the ReplicaCatalogue for this DataGridResource     * @param rcName    the name of the ReplicaCatalogue     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public boolean setReplicaCatalogue(String rcName)    {        if (rcName == null || rcName.length() == 0) {            return false;        }        rcID_ = GridSim.getEntityId(rcName);        return true;    }    /**     * Sets the ID of the ReplicaCatalogue, to which all the requests for adding     * and deleting files will be sent.     *     * @param rcID  the ReplicaCtalogue ID     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public boolean setReplicaCatalogue(int rcID) {        if (rcID < 0) {            return false;        }        rcID_ = rcID;        return true;    }    /**     * Registers a given file to the designated Replica Catalogue     * @param file  a file to be registered     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    protected boolean registerFile(File file)    {        if (file == null) {            return false;        }        return registerFile( file.getName() );    }    /**     * Registers a given file to the designated Replica Catalogue     * @param fileName  a file name to be registered     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    protected boolean registerFile(String fileName)    {        Object[] obj = new Object[2];        obj[0] = fileName;        obj[1] = resIdObj_;        super.sim_schedule(outputPort_, 0, DataGridTags.CTLG_ADD_REPLICA,                           new IO_data(obj, DataGridTags.PKT_SIZE, rcID_) );        return true;    }    /**     * Notifies a deleted file to the designated Replica Catalogue (RC)     * @param fileName  a file name to be de-registered in RC     * @param tag       a tag to denote the specific instruction to the RC     * @return an integer number denoting whether this operation is successful     *         or not     * @see gridsim.datagrid.DataGridTags#CTLG_DELETE_REPLICA     * @see gridsim.datagrid.DataGridTags#CTLG_DELETE_MASTER     * @see gridsim.datagrid.DataGridTags#FILE_DELETE_ERROR     * @see gridsim.datagrid.DataGridTags#FILE_DELETE_SUCCESSFUL     */    protected int deregisterDeletedFile(String fileName, int tag)    {        if (fileName == null || fileName.length() == 0) {            return DataGridTags.FILE_DELETE_ERROR;        }        Object[] obj = new Object[2];        obj[0] = fileName;        obj[1] = resIdObj_;        super.sim_schedule(outputPort_, GridSimTags.SCHEDULE_NOW, tag,                           new IO_data(obj, DataGridTags.PKT_SIZE, rcID_) );        return DataGridTags.FILE_DELETE_SUCCESSFUL;    }    /**     * Checks whether the resource has the given file     * @param file  a file to be searched     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    protected boolean contains(File file)    {        if (file == null) {            return false;        }        return contains( file.getName() );    }    /**     * Checks whether the resource has the given file     * @param fileName  a file name to be searched     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    protected boolean contains(String fileName)    {        if (fileName == null || fileName.length() == 0) {            return false;        }        Iterator it = storageList_.iterator();        Storage storage = null;        boolean result = false;        while (it.hasNext()) {            storage = (Storage) it.next();            if (storage.contains(fileName) == true) {                result = true;                break;            }        }        return result;    }    /**     * Gets the total storage capacity (in MByte) for this DataGrid resource     * @return total storage capacity (in MB)     */    public double getTotalStorageCapacity()    {        double capacity = 0;        Iterator it = storageList_.iterator();        Storage storage = null;        while (it.hasNext()) {            storage = (Storage) it.next();            capacity += storage.getCapacity();        }        return capacity;    }    ////////////////////////////////////////////////////////////    /**     * Adds a storage element to the DataGrid resource     * @param storage   the storage element to be added     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public abstract boolean addStorage(Storage storage);     /**     * Adds a list of storage elements to the DataGrid resource     * @param storageList   a list of storage elements to be added     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public abstract boolean addStorage(List storageList);    /**     * Adds a file to the local storage. However, the file is not registered     * to the Replica Catalogue.     * @param file  a file to be placed on the local resource     * @return an integer number denoting whether this operation is successful     *         or not     * @see gridsim.datagrid.DataGridTags#FILE_ADD_SUCCESSFUL     * @see gridsim.datagrid.DataGridTags#FILE_ADD_ERROR_STORAGE_FULL     */    protected abstract int addFile(File file);    /**     * Gets a physical file based on its name     * @param fileName  the file name to be retrieved     * @return the physical file or <tt>null</tt> if not found     */    protected abstract File getFile(String fileName);    /**     * Deletes a file from the local storage, and registers     * the change to the designated Replica Catalogue.     * @param fileName  the filename of the file to be deleted.     * @return an integer number denoting whether this operation is successful     *         or not     * @see gridsim.datagrid.DataGridTags#FILE_DELETE_SUCCESSFUL     * @see gridsim.datagrid.DataGridTags#FILE_DELETE_ERROR_READ_ONLY     */    protected abstract int deleteFile(String fileName);    /**     * Processes an incoming event     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public abstract boolean processEvent(Sim_event ev);    /**     * Registers all master files that are currently stored in the storage     * at the beginning of the simulatin     */    public abstract void registerAllMasterFiles();} // end class

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美伊人久久久久久午夜久久久久| 国产不卡在线一区| 蜜臀av一区二区在线观看 | 欧美精品久久一区| 久久亚洲一级片| 91精品免费观看| 中文字幕第一区| 天天影视涩香欲综合网| 成人黄色在线视频| 欧美一级搡bbbb搡bbbb| 亚洲精品日产精品乱码不卡| 国产九九视频一区二区三区| 欧美久久久久久久久| 亚洲另类一区二区| 国产不卡高清在线观看视频| 日韩一区二区三区高清免费看看| 一区在线观看视频| 国产91丝袜在线播放九色| 精品欧美乱码久久久久久1区2区| 亚洲已满18点击进入久久| 99这里都是精品| 国产农村妇女毛片精品久久麻豆 | 日韩无一区二区| 亚洲已满18点击进入久久| 99久久精品一区二区| 久久久蜜臀国产一区二区| 蜜臀av一区二区| 日韩久久久精品| 日本va欧美va精品发布| 欧美日韩成人高清| 亚洲电影中文字幕在线观看| 色狠狠一区二区| 一区二区三区四区中文字幕| 99re热视频这里只精品| 日韩久久一区二区| 在线精品视频一区二区三四 | 欧美激情资源网| 国产精品1区2区| 国产亚洲综合色| 国产精品亚洲一区二区三区妖精| 日韩精品一区二区三区在线播放 | 国产亚洲一本大道中文在线| 久久精品久久99精品久久| 日韩午夜在线影院| 另类专区欧美蜜桃臀第一页| 日韩精品一区二区三区蜜臀| 久久精品国产秦先生| 日韩一区二区精品葵司在线 | 成人av影视在线观看| 最新日韩av在线| 91精彩视频在线观看| 亚洲永久精品国产| 制服丝袜一区二区三区| 日韩vs国产vs欧美| 国产亚洲一区字幕| 99国产一区二区三精品乱码| 一区二区三区在线免费| 欧美电影影音先锋| 国产一区二区视频在线| 中文字幕综合网| 欧美精品日韩综合在线| 久久精品国产澳门| 国产精品久久二区二区| 日本道免费精品一区二区三区| 偷拍一区二区三区四区| 精品国产电影一区二区| 91亚洲资源网| 蜜桃精品视频在线| 中文字幕一区在线观看视频| 欧美疯狂性受xxxxx喷水图片| 紧缚捆绑精品一区二区| 亚洲精品中文在线观看| 日韩欧美你懂的| 91视频一区二区三区| 日本欧美肥老太交大片| 国产精品毛片a∨一区二区三区| 精品视频在线视频| 夫妻av一区二区| 美女脱光内衣内裤视频久久网站 | 一区二区三区欧美视频| 精品理论电影在线| 色嗨嗨av一区二区三区| 国产一区视频在线看| 亚洲一区二区三区影院| 国产日韩av一区二区| 欧美一区二区网站| 91网站在线播放| 国产精品99久久久| 免费在线观看一区| 午夜精品一区在线观看| 亚洲女人小视频在线观看| 精品成人在线观看| 欧美一区二区三区喷汁尤物| 色8久久人人97超碰香蕉987| 国产成人av一区二区三区在线观看| 香蕉久久一区二区不卡无毒影院| 国产精品久久久一区麻豆最新章节| 日韩一卡二卡三卡国产欧美| 色菇凉天天综合网| 99riav久久精品riav| 国产精品一级黄| 久88久久88久久久| 三级欧美韩日大片在线看| 一区二区三区成人在线视频| 国产精品久久久久一区| 久久精品人人爽人人爽| 精品久久久久久无| 日韩精品一区二区三区视频在线观看| 欧美三级电影网| 欧美性色黄大片| 欧美三级电影在线看| 欧美日韩一区二区三区视频| 91激情在线视频| 欧美亚洲高清一区| 91成人国产精品| 欧美午夜精品久久久久久超碰| 色综合久久久久综合| 色综合久久综合| 在线视频中文字幕一区二区| 色哟哟一区二区在线观看| 欧美一级精品大片| 日韩美女主播在线视频一区二区三区 | 日韩欧美第一区| 欧美一级精品在线| 久久久综合激的五月天| 国产亚洲一区二区三区在线观看| 久久日一线二线三线suv| 欧美一区二区女人| 日韩精品影音先锋| 久久一区二区三区国产精品| 久久久久国产精品麻豆ai换脸| 亚洲国产高清在线| 亚洲色图制服丝袜| 亚洲主播在线观看| 日韩国产精品大片| 国模一区二区三区白浆| 丁香六月综合激情| 色噜噜狠狠成人网p站| 91精品国产91久久久久久一区二区| 欧美成人三级在线| 国产精品久久看| 亚洲午夜激情av| 国产在线看一区| 日本乱码高清不卡字幕| 91精品啪在线观看国产60岁| 久久亚洲精品国产精品紫薇| 国产精品久久精品日日| 午夜精品一区在线观看| 国产乱对白刺激视频不卡| 91一区在线观看| 日韩免费视频一区二区| 国产精品久久久久久久久果冻传媒| 亚洲精品国产品国语在线app| 蜜臀av一级做a爰片久久| 国产成人av电影在线| 欧美片在线播放| 国产精品免费视频网站| 亚洲一区二区综合| 国产精品18久久久| 欧美电影在线免费观看| 国产精品久久久久久久久免费樱桃| 午夜久久久久久久久| 福利一区二区在线观看| 67194成人在线观看| 国产精品三级av| 亚洲一区国产视频| 欧美色综合网站| 国产三级久久久| 午夜视频在线观看一区二区 | 成人小视频免费观看| 在线观看不卡一区| 国产网站一区二区| 爽好多水快深点欧美视频| 波多野洁衣一区| 精品久久久网站| 视频一区视频二区中文字幕| 成人app下载| 久久伊人蜜桃av一区二区| 亚洲国产日韩a在线播放| 成人午夜精品在线| 精品国产a毛片| 偷拍与自拍一区| 欧美制服丝袜第一页| 国产精品网站导航| 国产精品18久久久久久久网站| 欧美一区二区私人影院日本| 亚洲国产另类精品专区| 91视频国产观看| 中文字幕一区二区三区四区不卡| 久久97超碰色| 欧美一区二区高清| 日韩精品福利网| 欧美日本精品一区二区三区| 亚洲男同性恋视频| 色av成人天堂桃色av| 一区二区三区四区不卡在线 | 亚洲国产精品人人做人人爽| 成人动漫av在线| 亚洲国产成人自拍| 懂色av一区二区三区蜜臀|