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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? fileattribute.java

?? 中間件開發(fā)詳細(xì)說(shuō)明:清華大學(xué)J2EE教程講義(ppt)-Tsinghua University J2EE tutorial lectures (ppt) [上載源碼成為會(huì)員下載此源碼] [成為VIP會(huì)
?? JAVA
字號(hào):
/* * 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;import gridsim.GridSim;import gridsim.net.Link;import java.util.Date;/** * A class for storing related information regarding to a * {@link gridsim.datagrid.File} entity. * * @author  Uros Cibej and Anthony Sulistio * @since   GridSim Toolkit 4.0 */public class FileAttribute {    private String name_;           // logical file name    private String ownerName_;      // owner name of this file    private int id_;                // file ID given by a Replica Catalogue    private int type_;              // file type, e.g. raw, reconstructed, etc    private int size_;              // file size in byte    private int checksum_;          // check sum    private double lastUpdateTime_; // last updated time (sec) - relative    private long creationTime_;     // creation time (ms) - abosulte/relative    private double cost_;           // price of this file    private boolean masterCopy_;    // false if it is a replica    private boolean readOnly_;      // false if it can be rewritten    private int resourceID_;        // resource ID storing this file    /**     * Allocates a new FileAttribute class.     * @param fileName  file name     * @param fileSize  size of this file (in bytes)     * @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 FileAttribute(String fileName, int fileSize)                         throws ParameterException {        // check for errors in the input        if (fileName == null || fileName.length() == 0) {            throw new ParameterException(                        "FileAttribute(): Error - invalid file name.");        }        if (fileSize <= 0) {            throw new ParameterException(                        "FileAttribute(): Error - size <= 0.");        }        size_ = fileSize;        name_ = fileName;        // set the file creation time. This is an abolute time        Date date = GridSim.getSimulationStartDate();        if (date != null) {            creationTime_ = date.getTime();        } else {            creationTime_ = 0;        }        ownerName_ = null;        id_ = File.NOT_REGISTERED;        checksum_ = 0;        type_ = File.TYPE_UNKOWN;        lastUpdateTime_ = 0;        cost_ = 0;        resourceID_ = -1;        masterCopy_ = true;        readOnly_ = false;    }    /**     * Copy the values of this object into another FileAttribute class     * @param attr  a FileAttribute object (the destination)     * @return <tt>true</tt> if the copy operation is successful,     *         <tt>false</tt> otherwise     */    public boolean copyValue(FileAttribute attr) {        if (attr == null) {            return false;        }        attr.setFileSize(size_);        attr.setResourceID(resourceID_);        attr.setOwnerName(ownerName_);        attr.setUpdateTime(lastUpdateTime_);        attr.setRegistrationID(id_);        attr.setType(type_);        attr.setChecksum(checksum_);        attr.setCost(cost_);        attr.setMasterCopy(masterCopy_);        attr.setReadOnly(readOnly_);        attr.setName(name_);        attr.setCreationTime(creationTime_);        return true;    }    /**     * Sets the file creation time (in millisecond)     * @param creationTime  the file creation time (in millisecond)     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public boolean setCreationTime(long creationTime) {        if (creationTime <= 0) {            return false;        }        creationTime_ = creationTime;        return true;    }    /**     * Gets the file creation time (in millisecond)     * @return the file creation time (in millisecond)     */    public long getCreationTime() {        return creationTime_;    }    /**     * 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) {        if (resourceID == -1) {            return false;        }        resourceID_ = resourceID;        return true;    }    /**     * Gets the resource ID that stores this file     * @return the resource ID     */    public int getResourceID() {        return resourceID_;    }    /**     * 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) {        if (name == null || name.length() == 0) {            return false;        }        ownerName_ = name;        return true;    }    /**     * Gets the owner name of this file     * @return the owner name or <tt>null</tt> if empty     */    public String getOwnerName() {        return ownerName_;    }    /**     * 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() {        int length = DataGridTags.PKT_SIZE;        if (ownerName_ != null) {            length += ownerName_.length();        }        if (name_ != null) {            length += name_.length();        }        return length;    }    /**     * 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) {        if (fileSize < 0) {            return false;        }        size_ = fileSize;        return true;    }    /**     * Gets the file size (in MBytes)     * @return the file size (in MBytes)     */    public int getFileSize() {        return size_;    }    /**     * Gets the file size (in bytes)     * @return the file size (in bytes)     */    public int getFileSizeInByte() {        return size_ * 1000000;   // 1e6        //return size_ * 1048576;   // 1e6 - more accurate    }    /**     * 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) {        if (time <= 0 || time < lastUpdateTime_) {            return false;        }        lastUpdateTime_ = time;        return true;    }    /**     * Gets the last update time (in seconds)     * @return the last update time (in seconds)     */    public double getLastUpdateTime() {        return lastUpdateTime_;    }    /**     * 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) {        if (id < 0) {            return false;        }        id_ = id;        return true;    }    /**     * Gets the file registration ID     * @return registration ID     */    public int getRegistrationID() {        return id_;    }    /**     * 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) {        if (type < 0) {            return false;        }        type_ = type;        return true;    }    /**     * Gets this file type     * @return file type     */    public int getType() {        return type_;    }    /**     * 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) {        if (checksum < 0) {            return false;        }        checksum_ = checksum;        return true;    }    /**     * Gets the file checksum     * @return file checksum     */    public int getChecksum() {        return checksum_;    }    /**     * 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) {        if (cost < 0) {            return false;        }        cost_ = cost;        return true;    }    /**     * Gets the  cost associated with this file     * @return the cost of this file     */    public double getCost() {        return cost_;    }    /**     * 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() {        boolean result = true;        if (id_ == File.NOT_REGISTERED) {            result = false;        }        return result;    }    /**     * 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) {        masterCopy_ = 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 masterCopy_;    }    /**     * 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) {        readOnly_ = 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 readOnly_;    }    /**     * Sets the file name     * @param name  the file name     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     */    public void setName(String name) {        this.name_ = name;    }    /**     * Returns the file name     * @return the file name     */    public String getName() {        return name_;    }} // end class

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美午夜在线一二页| 亚洲精品久久久久久国产精华液| 91精品国产色综合久久不卡蜜臀 | 懂色av中文一区二区三区| 捆绑紧缚一区二区三区视频| 婷婷综合在线观看| 天天综合网天天综合色| 无码av免费一区二区三区试看 | 国产精品88888| 国产精品亚洲视频| 成人av在线看| 色综合久久88色综合天天 | 亚洲女性喷水在线观看一区| 亚洲欧美日韩综合aⅴ视频| 亚洲欧美日韩国产综合| 亚洲一区二区偷拍精品| 天天综合天天做天天综合| 免费看日韩精品| 久久成人免费日本黄色| 国产精品亚洲成人| 成人97人人超碰人人99| 欧美视频日韩视频| 91精品一区二区三区久久久久久| 日韩一卡二卡三卡四卡| 欧美精品一区二区三区四区| 国产亚洲成aⅴ人片在线观看| 国产精品福利电影一区二区三区四区| 亚洲欧美一区二区三区久本道91| 亚洲成av人片在www色猫咪| 日本不卡在线视频| 国产电影精品久久禁18| 色哟哟一区二区三区| 91精品国产综合久久久久久久 | 一区二区三区中文免费| 亚洲成a人在线观看| 久久精品国产一区二区| 东方欧美亚洲色图在线| 欧美视频在线观看一区二区| 日韩欧美美女一区二区三区| 中文字幕一区二区三区蜜月 | 国产精品亚洲人在线观看| 91污在线观看| 欧美videos中文字幕| 综合欧美亚洲日本| 日韩有码一区二区三区| 国产99久久久国产精品免费看| 色婷婷av一区| 26uuu国产电影一区二区| 18成人在线视频| 天天影视色香欲综合网老头| 成人深夜在线观看| 欧美日韩一本到| 国产欧美综合在线| 香蕉加勒比综合久久| 国产福利一区二区三区视频在线| 欧美日韩在线一区二区| 久久久久久亚洲综合| 日韩在线播放一区二区| 99精品久久99久久久久| 欧美成人三级在线| 一区二区欧美视频| 丰满少妇久久久久久久| 欧美一区二区三区思思人| 亚洲欧美日韩人成在线播放| 韩国三级在线一区| 欧美在线一区二区| 中文字幕在线不卡视频| 精品一区在线看| 欧美日韩一区国产| 最新久久zyz资源站| 国产精品911| 欧美成人一区二区三区 | 欧美性大战久久久| 中文字幕中文在线不卡住| 麻豆成人av在线| 欧美视频自拍偷拍| 亚洲男人的天堂av| 成人免费毛片嘿嘿连载视频| 精品欧美黑人一区二区三区| 婷婷综合五月天| 欧美性高清videossexo| 亚洲精品精品亚洲| 成人av网站免费| 国产婷婷精品av在线| 国产精品欧美经典| 国产日韩精品一区二区三区在线| 亚洲成在线观看| 一本久久综合亚洲鲁鲁五月天| 国产亚洲女人久久久久毛片| 麻豆成人久久精品二区三区红 | 久久综合资源网| 日韩高清电影一区| 欧美日韩成人高清| 亚洲3atv精品一区二区三区| 在线观看网站黄不卡| 亚洲欧美福利一区二区| 99国内精品久久| 亚洲三级小视频| 成人免费的视频| 欧美国产亚洲另类动漫| 国产成人免费在线观看| 日本一区二区高清| 波多野结衣一区二区三区| 国产精品国产自产拍高清av | 欧美久久久久久蜜桃| 一区二区免费看| 在线观看视频一区| 亚洲成人免费观看| 欧美日韩黄色影视| 日本亚洲三级在线| 欧美精三区欧美精三区| 性做久久久久久免费观看欧美| 欧美三电影在线| 日本欧美肥老太交大片| 日韩午夜在线影院| 国产永久精品大片wwwapp| 国产拍欧美日韩视频二区| 成人动漫一区二区| 亚洲精品视频在线看| 欧美日韩国产在线观看| 蜜芽一区二区三区| 久久久国产综合精品女国产盗摄| 国产成人欧美日韩在线电影| 亚洲视频免费在线| 欧美视频一区二区三区四区 | 99精品热视频| 亚洲一区二区三区四区在线| 欧美妇女性影城| 国产剧情一区在线| 亚洲视频网在线直播| 4hu四虎永久在线影院成人| 久久丁香综合五月国产三级网站| 国产欧美一区二区精品婷婷| 91在线精品一区二区三区| 亚洲不卡在线观看| 久久精品一区二区三区不卡 | 国产欧美一区二区精品性色| 色哟哟一区二区三区| 看电影不卡的网站| 《视频一区视频二区| 一本到不卡免费一区二区| 日本亚洲免费观看| 欧美韩国日本不卡| 欧洲精品一区二区三区在线观看| 青草国产精品久久久久久| 久久久久久久综合日本| 欧美在线你懂得| 国产精品中文欧美| 亚洲成人黄色小说| 精品国产电影一区二区| 色一情一伦一子一伦一区| 美女视频网站黄色亚洲| 国产精品沙发午睡系列990531| 911精品国产一区二区在线| 国产精品影音先锋| 亚洲成人福利片| 日本一区二区三区在线观看| 欧美天天综合网| 粉嫩蜜臀av国产精品网站| 亚洲成a人在线观看| 国产精品乱码久久久久久| 欧美日韩国产精品成人| 成人h动漫精品一区二区| 麻豆精品久久精品色综合| 亚洲精品乱码久久久久| 国产日韩欧美精品在线| 欧美丰满美乳xxx高潮www| 播五月开心婷婷综合| 国产麻豆欧美日韩一区| 亚洲蜜臀av乱码久久精品| 欧美成人艳星乳罩| 欧美日本国产一区| 91在线高清观看| 国产精品正在播放| 麻豆精品一区二区三区| 亚洲一二三区不卡| 国产精品国产三级国产普通话蜜臀 | 国产亚洲精品福利| 在线成人小视频| 91免费观看视频| 国产91对白在线观看九色| 激情深爱一区二区| 免费日韩伦理电影| 视频在线观看一区二区三区| 日韩伦理免费电影| 国产精品不卡在线| 久久久99久久| 精品91自产拍在线观看一区| 555夜色666亚洲国产免| 在线欧美日韩国产| 91美女视频网站| 99久久国产综合色|国产精品| 国产做a爰片久久毛片| 日韩av午夜在线观看| 亚洲成人动漫在线免费观看| 亚洲综合无码一区二区| 亚洲精品一二三| 亚洲美女免费视频| 成人欧美一区二区三区视频网页 | 国产一区二区毛片|