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

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

?? file.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.ParameterException;/** * A class for representing a physical file in a DataGrid environment * * @author  Uros Cibej and Anthony Sulistio * @since   GridSim Toolkit 4.0 */public class File {    private String name_;           // logical file name    private FileAttribute attr_;    // a file attribute    // a transaction time for adding / getting /deleting this file    private double transTime_;    /** Denotes that this file has not been registered to a Replica Catalogue */    public static final int NOT_REGISTERED = -1;    /** Denotes that the type of this file is unknown */    public static final int TYPE_UNKOWN = 0;    /** Denotes that the type of this file is a raw data */    public static final int TYPE_RAW_DATA = 1;    /** Denotes that the type of this file is a reconstructed data */    public static final int TYPE_RECONSTRUCTED_DATA = 2;    /** Denotes that the type of this file is a tag data */    public static final int TYPE_TAG_DATA = 3;    /**     * Creates a new DataGrid file with a given size (in MBytes). <br>     * NOTE: By default, a newly-created file is set to a <b>master</b> copy.     * @param fileName  file name     * @param fileSize  file size is in MBytes     * @throws ParameterException This happens when one of the following     * scenarios occur:     *      <ul>     *      <li> the file name is empty or <tt>null</tt>     *      <li> the file size is zero or negative numbers     *      </ul>     */    public File(String fileName, int fileSize) throws ParameterException    {        if (fileName == null || fileName.length() == 0) {            throw new ParameterException("File(): Error - invalid file name.");        }        if (fileSize <= 0) {            throw new ParameterException("File(): Error - size <= 0.");        }        name_ = fileName;        attr_ = new FileAttribute(fileName, fileSize);        transTime_ = 0;    }    /**     * Copy constructor, i.e. cloning from a source file into this object,     * but this object is set to a <b>replica</b>     * @param file  the source of a File object to copy     * @throws ParameterException This happens when the source file is     *                            <tt>null</tt>     */    public File(File file) throws ParameterException    {        if (file == null) {            throw new ParameterException("File(): Error - file is null.");        }        // copy the attributes into the file        FileAttribute fileAttr = file.getFileAttribute();        attr_.copyValue(fileAttr);        fileAttr.setMasterCopy(false);   // set this file to replica    }    /**     * Clone this file but the clone file is set to a <b>replica</b>     * @return  a clone of this file (as a replica)     *          or <tt>null</tt> if an error occurs     */    public File makeReplica() {        return makeCopy();    }    /**     * Clone this file and make the new file as a <b>master</b> copy as well     * @return  a clone of this file (as a master copy)     *          or <tt>null</tt> if an error occurs     */    public File makeMasterCopy()    {        File file = makeCopy();        if (file != null) {            file.setMasterCopy(true);        }        return file;    }    /**     * Makes a copy of this file     * @return  a clone of this file (as a replica)     *          or <tt>null</tt> if an error occurs     */    private File makeCopy()    {        File file = null;        try        {            file = new File(name_, attr_.getFileSize());            FileAttribute fileAttr = file.getFileAttribute();            attr_.copyValue(fileAttr);            fileAttr.setMasterCopy(false);   // set this file to replica        }        catch (Exception e) {            file = null;        }        return file;    }    /**     * Gets an attribute of this file     * @return a file attribute     */    public FileAttribute getFileAttribute() {        return attr_;    }    /**     * Gets the size of this object (in byte).<br>     * NOTE: This object size is NOT the actual file size. Moreover,     * this size is used for transferring this object over a network.     * @return the object size (in byte)     */    public int getAttributeSize() {        return attr_.getAttributeSize();    }    /**     * Sets the resource ID that stores this file     * @param resourceID    a resource ID     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public boolean setResourceID(int resourceID) {        return attr_.setResourceID(resourceID);    }    /**     * Gets the resource ID that stores this file     * @return the resource ID     */    public int getResourceID() {        return attr_.getResourceID();    }    /**     * Returns the file name     * @return the file name     */    public String getName() {        return attr_.getName();    }    /**     * Sets the file name     * @param name  the file name     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public void setName(String name) {       attr_.setName(name);    }    /**     * Sets the owner name of this file     * @param name  the owner name     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public boolean setOwnerName(String name) {        return attr_.setOwnerName(name);    }    /**     * Gets the owner name of this file     * @return the owner name or <tt>null</tt> if empty     */    public String getOwnerName() {        return attr_.getOwnerName();    }    /**     * Gets the file size (in MBytes)     * @return the file size (in MBytes)     */    public int getSize() {        return attr_.getFileSize();    }    /**     * Gets the file size (in bytes)     * @return the file size (in bytes)     */    public int getSizeInByte() {        return attr_.getFileSizeInByte();    }    /**     * Sets the file size (in MBytes)     * @param fileSize  the file size (in MBytes)     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public boolean setFileSize(int fileSize) {        return attr_.setFileSize(fileSize);    }    /**     * Sets the last update time of this file (in seconds)<br>     * NOTE: This time is relative to the start time. Preferably use     *       {@link gridsim.GridSim#clock()} method.     * @param time  the last update time (in seconds)     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public boolean setUpdateTime(double time) {        return attr_.setUpdateTime(time);    }    /**     * Gets the last update time (in seconds)     * @return the last update time (in seconds)     */    public double getLastUpdateTime() {        return attr_.getLastUpdateTime();    }    /**     * Sets the file registration ID (published by a Replica Catalogue entity)     * @param id    registration ID     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public boolean setRegistrationID(int id) {        return attr_.setRegistrationID(id);    }    /**     * Gets the file registration ID     * @return registration ID     */    public int getRegistrationID() {        return attr_.getRegistrationID();    }    /**     * Sets the file type (e.g. raw, tag, etc)     * @param type  a file type     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public boolean setType(int type) {        return attr_.setType(type);    }    /**     * Gets this file type     * @return file type     */    public int getType() {        return attr_.getType();    }    /**     * Sets the checksum of this file     * @param checksum  the checksum of this file     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public boolean setChecksum(int checksum) {        return attr_.setChecksum(checksum);    }    /**     * Gets the file checksum     * @return file checksum     */    public int getChecksum() {        return attr_.getChecksum();    }    /**     * Sets the cost associated with this file     * @param cost  cost of this file     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public boolean setCost(double cost) {        return attr_.setCost(cost);    }    /**     * Gets the  cost associated with this file     * @return the cost of this file     */    public double getCost() {        return attr_.getCost();    }    /**     * Gets the file creation time (in millisecond)     * @return the file creation time (in millisecond)     */    public long getCreationTime() {        return attr_.getCreationTime();    }    /**     * Checks if this file already registered to a Replica Catalogue     * @return <tt>true</tt> if it is registered, <tt>false</tt> otherwise     */    public boolean isRegistered() {        return attr_.isRegistered();    }    /**     * Marks this file as a master copy or replica     * @param masterCopy    a flag denotes <tt>true</tt> for master copy or     *                      <tt>false</tt> for a replica     */    public void setMasterCopy(boolean masterCopy) {        attr_.setMasterCopy(masterCopy);    }    /**     * Checks whether this file is a master copy or replica     * @return <tt>true</tt> if it is a master copy or <tt>false</tt> otherwise     */    public boolean isMasterCopy() {        return attr_.isMasterCopy();    }    /**     * Marks this file as a read only or not     * @param readOnly      a flag denotes <tt>true</tt> for read only or     *                      <tt>false</tt> for re-writeable     */    public void setReadOnly(boolean readOnly) {        attr_.setReadOnly(readOnly);    }    /**     * Checks whether this file is a read only or not     * @return <tt>true</tt> if it is a read only or <tt>false</tt> otherwise     */    public boolean isReadOnly() {        return attr_.isReadOnly();    }    /**     * Sets the current transaction time (in second) of this file.     * This transaction time can be related to the operation of adding /     * deleting / getting this file on a resource's storage.     * @param time  the transaction time (in second)     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     * @see gridsim.datagrid.storage.Storage#addFile(File)     * @see gridsim.datagrid.storage.Storage#addFile(List)     * @see gridsim.datagrid.storage.Storage#addReservedFile(File)     * @see gridsim.datagrid.storage.Storage#deleteFile(File)     * @see gridsim.datagrid.storage.Storage#deleteFile(String)     * @see gridsim.datagrid.storage.Storage#deleteFile(String, File)     * @see gridsim.datagrid.storage.Storage#getFile(String)     * @see gridsim.datagrid.storage.Storage#renameFile(File, String)     */    public boolean setTransactionTime(double time)    {        if (time < 0) {            return false;        }        transTime_ = time;        return true;    }    /**     * Gets the last transaction time of this file (in second).     * @return the transaction time (in second)     */    public double getTransactionTime() {        return transTime_;    }} // end class

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线观看欧美日本| 宅男在线国产精品| 2023国产一二三区日本精品2022| 日本伊人精品一区二区三区观看方式| 欧美日本一区二区三区四区| 日韩综合小视频| 日韩欧美的一区| 国产麻豆午夜三级精品| 国产午夜亚洲精品午夜鲁丝片| 国产精品一级二级三级| 欧美激情一区二区在线| 色婷婷综合久久久久中文 | 韩国视频一区二区| 久久色成人在线| va亚洲va日韩不卡在线观看| 亚洲精品高清在线观看| 欧美三级韩国三级日本三斤| 国产黄人亚洲片| 国产精品18久久久| 亚洲狼人国产精品| 日韩亚洲欧美一区二区三区| 国产suv精品一区二区三区| 亚洲色图欧美激情| 欧美一级日韩不卡播放免费| 国产一区二区三区国产| 亚洲精品国产无套在线观| 91麻豆精品国产91| 国产98色在线|日韩| 亚洲综合色区另类av| 日韩欧美激情四射| 91免费版pro下载短视频| 日日摸夜夜添夜夜添国产精品 | 亚洲综合一区二区| 日韩久久久久久| av在线一区二区| 蜜桃视频在线观看一区| 国产精品超碰97尤物18| 777色狠狠一区二区三区| 丰满少妇久久久久久久| 午夜精品久久久久久不卡8050| 久久久蜜臀国产一区二区| 欧美午夜片在线看| 福利一区二区在线| 国产成人av电影免费在线观看| 欧美日韩免费观看一区二区三区| 国产福利电影一区二区三区| 亚洲成人av福利| 国产精品电影一区二区| 欧美videossexotv100| 欧美在线999| 成人h动漫精品| 狠狠狠色丁香婷婷综合激情| 亚洲第一成年网| 中文字幕日本乱码精品影院| 日韩欧美一级在线播放| 欧美视频完全免费看| 成人性生交大片免费看在线播放 | 在线播放欧美女士性生活| caoporn国产精品| 国产资源在线一区| 日本一区中文字幕| 亚洲一区二区三区美女| 国产精品久久久久久久久动漫| 欧美一级在线免费| 欧美老人xxxx18| 欧美自拍偷拍一区| 色综合一个色综合| 国产一区激情在线| 午夜成人在线视频| 国产精品毛片大码女人| 91女厕偷拍女厕偷拍高清| 国产·精品毛片| 国产精品一区一区| 国模冰冰炮一区二区| 久久99精品国产麻豆婷婷洗澡| 亚洲风情在线资源站| 亚洲欧美一区二区不卡| 国产精品国产精品国产专区不蜜| 国产午夜精品一区二区三区视频| 欧美不卡视频一区| 久久亚洲二区三区| 久久久久高清精品| 久久久不卡网国产精品一区| 久久久精品蜜桃| 国产三级一区二区| 国产精品视频线看| 亚洲人亚洲人成电影网站色| 亚洲免费高清视频在线| 亚洲一级电影视频| 亚洲1区2区3区视频| 日本网站在线观看一区二区三区| 国产欧美一区二区三区沐欲| 亚洲成av人片在线观看无码| 婷婷国产v国产偷v亚洲高清| 免费高清视频精品| 日韩精品福利网| 美国十次综合导航| 狠狠色狠狠色综合日日91app| 国产在线不卡一区| 成人美女视频在线观看| 97se亚洲国产综合自在线观| 色婷婷激情综合| 欧美日韩综合色| 日韩免费成人网| 久久久久久99久久久精品网站| 国产精品蜜臀av| 欧美哺乳videos| 国产精品久久三| 91精品国产91久久久久久一区二区| 一区二区三区视频在线看| 99在线精品免费| 欧美成人性福生活免费看| 伦理电影国产精品| 韩国精品在线观看| 国产一区二区三区久久久 | 一区二区三区av电影| 午夜精品久久久久| 国产精品中文字幕欧美| 91麻豆精东视频| 日韩女优视频免费观看| 国产精品对白交换视频| 日韩黄色小视频| 成人app网站| 在线综合视频播放| 国产精品久久久一本精品| 午夜在线电影亚洲一区| 成人网在线播放| 麻豆91精品视频| 国产老妇另类xxxxx| 色综合亚洲欧洲| 久久这里只有精品6| 国产精品久久久久久久久免费桃花| 日韩影视精彩在线| 99视频在线观看一区三区| 日韩欧美国产小视频| 亚洲美女偷拍久久| 国产一区二区在线观看视频| 欧洲另类一二三四区| 国产欧美视频一区二区| 免费观看成人鲁鲁鲁鲁鲁视频| 91在线精品秘密一区二区| 欧美成人欧美edvon| 亚洲第一久久影院| 91蜜桃免费观看视频| 国产日本一区二区| 久久精品国产一区二区三 | 欧美日韩国产精品成人| 欧美激情在线免费观看| 九色|91porny| 欧美日韩精品免费| 亚洲精选免费视频| 国产一区二区精品久久99| 日韩一区二区三区视频在线 | 成人中文字幕电影| 正在播放一区二区| 亚洲国产成人av网| 色婷婷精品久久二区二区蜜臀av| 亚洲国产成人午夜在线一区| 国产一区二区免费视频| 欧美成人a∨高清免费观看| 午夜久久久久久久久久一区二区| 色88888久久久久久影院野外| 夜夜爽夜夜爽精品视频| 久久国产综合精品| 欧美一级日韩不卡播放免费| 日韩精品每日更新| 777午夜精品免费视频| 午夜精品免费在线| 欧美一区二区三区四区在线观看| 视频在线观看一区| 在线电影院国产精品| 五月婷婷久久综合| 91麻豆精品国产91久久久久久 | 91精品国产综合久久久久| 亚洲高清视频在线| 欧美麻豆精品久久久久久| 婷婷亚洲久悠悠色悠在线播放| 欧美人伦禁忌dvd放荡欲情| 三级一区在线视频先锋 | 国产精品一区二区久久精品爱涩 | 欧美国产日韩在线观看| 丁香五精品蜜臀久久久久99网站| 久久精品人人做人人综合| 成人性生交大片免费看在线播放 | 成人午夜精品一区二区三区| 欧美一区二区三区视频免费 | 亚洲女性喷水在线观看一区| 色噜噜夜夜夜综合网| 亚洲综合色网站| 欧美一区二区精品在线| 国产一区二区三区观看| 亚洲欧洲一区二区在线播放| 色悠久久久久综合欧美99| 午夜av电影一区| 337p日本欧洲亚洲大胆色噜噜| 国产乱码一区二区三区| 国产精品不卡在线| 欧美理论电影在线| 国产电影精品久久禁18| 亚洲欧美日韩综合aⅴ视频|