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

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

?? netpacket.java

?? 實現網格環境下資源調度和分配的仿真
?? JAVA
字號:
/* * ** Network and Service Differentiation Extensions to GridSim 3.0 ** * * Gokul Poduval & Chen-Khong Tham * Computer Communication Networks (CCN) Lab * Dept of Electrical & Computer Engineering * National University of Singapore * August 2004 * * Licence: GPL - http://www.gnu.org/copyleft/gpl.html * * NetPacket.java - Implementation of a Network Packet. * */package gridsim.net;import gridsim.*;import eduni.simjava.*;/** * Structure of a packet used to encapsulate data passing through the network. * * @invariant $none * @since GridSim Toolkit 3.1 * @author Gokul Poduval & Chen-Khong Tham, National University of Singapore */public class NetPacket implements Packet{    private int destID;  // where the packet wants to go    private int srcID;   // sender ID    private long size;   // packet size (for calculating transmission time)    private Object obj;  // the actual object, the type depends on context    // original tag with which the encapsulated object was submitted    private int tag;    // the last entity encountered by the object, used to determine direction    private int last;    private String desc_;   // description of this packet    private int classType;  // level of service for this packet    private int pktNum;     // packet num in one group    private int totalPkts;  // total num of packet that belongs to a group    private int pktID_;     // a unique packet ID issued by an entity    /**     * Constructs a network packet for data that fits into a single network     * packet.     *     * @param data   The data to be encapsulated.     * @param pktID  The ID of this packet     * @param size   The size of the data (in bytes)     * @param tag    The original tag which was used with the data, its     *               reapplied when the data is extracted from the NetPacket.     * @param srcID  The id of the entity where the packet was created.     * @param destID The destination to which the packet has to be sent.     * @pre $none     * @post $none     */    public NetPacket(Object data, int pktID, long size, int tag, int srcID,                     int destID)    {        this.obj = data ;        this.size = size ;        this.tag = tag ;        this.destID = destID;        this.srcID = srcID ;        this.last = srcID ;        this.pktID_ = pktID;        this.classType = 0 ;        this.pktNum = 1;        this.totalPkts = 1;        this.desc_ = null;    }    /**     * This is used to construct a packet that is one in a series. This happens     * when a large piece of data is required to be brokwn down into smaller     * chunks so that they can traverse of links that only support a certain     * MTU. It also allows setting of a classtype so that network schedulers     * maybe provide differntial service to it.     *     * @param data   The data to be encapsulated.     * @param pktID  The ID of this packet     * @param size   The size of the data (in bytes)     * @param tag    The original tag which was used with the data, its     *               reapplied when the data is extracted from the NetPacket.     * @param srcID  The id of the entity where the packet was created.     * @param destID The destination to which the packet has to be sent.     * @param netServiceType the network class type of this packet     * @param pktNum The packet number of this packet in its series. If there     *               are 10 packets, they should be numbered from 1 to 10.     * @param totalPkts The total number of packets that the original data was     *               split into. This is used by the receiver to confirm that     *               all packets have been received.     * @pre $none     * @post $none     */    public NetPacket(Object data, int pktID, long size, int tag, int srcID,                     int destID, int netServiceType, int pktNum, int totalPkts)    {        this.obj = data;        this.size = size;        this.tag = tag;        this.destID = destID;        this.srcID = srcID;        this.last = srcID;        this.classType = netServiceType;        this.pktNum = pktNum;        this.pktID_ = pktID;        this.totalPkts = totalPkts;        this.desc_ = null;    }    /**     * Returns a description of this packet     * @return a description of this packet     * @pre $none     * @post $none     */    public String toString()    {        if (desc_ == null)        {            StringBuffer sb = new StringBuffer("Packet #");            sb.append(pktNum);            sb.append(", out of, ");            sb.append(totalPkts);            sb.append(", with id, ");            sb.append(pktID_);            sb.append(", from, ");            sb.append( GridSim.getEntityName(srcID) );            sb.append(", to, ");            sb.append( GridSim.getEntityName(destID) );            sb.append(", tag, ");            if (tag == GridSimTags.PKT_FORWARD) {                sb.append("GridSimTags.PKT_FORWARD");            }            else if (tag == GridSimTags.JUNK_PKT) {                sb.append("GridSimTags.JUNK_PKT");            }            else {                sb.append(tag);            }            desc_ = sb.toString();        }        return desc_;    }    /**     * Returns the data encapsulated in this NetPacket     * @return data encapsulated in this packet     * @pre $none     * @post $none     */    public Object getData() {        return obj;    }    /**     * Returns the source ID of this packet. The source ID is where the     * NetPacket was originally created.     *     * @return the source id.     * @pre $none     * @post $none     */    public int getSrcID() {        return srcID;    }    /**     * Returns the ID of this packet     * @return packet ID     * @pre $none     * @post $none     */    public int getID() {        return pktID_;    }    /**     * Modifies the data encapsulated in this NetPacket.     * @param data  the packet's data     * @pre $none     * @post $none     */    public void setData(Object data) {        this.obj = data;    }    /**     * Gets the size of this packet     * @return the packet size     * @pre $none     * @post $none     */    public long getSize() {        return size;    }    /**     * Sets the packet size     * @param size  the packet size     * @return <tt>true</tt> if it is successful, <tt>false</tt> otherwise     * @pre size >= 0     * @post $none     */    public boolean setSize(long size)    {        if (size < 0) {            return false;        }        this.size = size;        return true;    }    /**     * Returns the tag associated originally with data that was encapsulated in     * this packet.     *     * @return the tag of the data contained.     * @pre $none     * @post $none     */    public int getTag() {        return tag;    }    /**     * Returns the destination ID of this packet     *     * @return destination ID     * @pre $none     * @post $none     */    public int getDestID() {        return destID;    }    /**     * Sets the destination id of this packet     * @param id   the destination id     * @pre id >= 0     * @post $none     */    public void setDestID(int id) {        this.destID = id;    }    /**     * Sets the last hop that this NetPacket traversed. This is used to     * determine the next hop at routers. Only routers and hosts/GridResources     * set this, links do not modify it.     * @param last  the entity ID from the last hop     * @pre last >= 0     * @post $none     */    public void setLast(int last) {        this.last = last;    }    /**     * Returns the ID of the last hop that this packet traversed. This could be     * the ID of a router, host or GridResource.     *     * @return ID of the last hop     * @pre $none     * @post $none     */    public int getLast() {        return last;    }    /**     * Sets the network class type of this packet, so that it can receive     * differentiated services.     * @param netServiceType  a network service type     * @pre netServiceType >= 0     * @post $none     */    public void setNetServiceType(int netServiceType) {        this.classType = netServiceType;    }    /**     * Returns the class type of this packet. Used by routers etc. to determine     * the level of service that this packet should obtain.     *     * @return the class of this packet     * @pre $none     * @post $none     */    public int getNetServiceType() {        return classType;    }    /**     * Returns the serial number of this packet.     *     * @return packet number     * @pre $none     * @post $none     */    public int getPacketNum() {        return pktNum;    }    /**     * Returns the total number of packets in this stream. A stream of     * packets is sent whenever the data is too big to be sent as one     * packet.     *     * @return total number of packets in this stream.     * @pre $none     * @post $none     */    public int getTotalPackets() {        return totalPkts;    }} // end class

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
26uuu久久综合| 欧美日韩成人高清| 国产女人18水真多18精品一级做| 国内不卡的二区三区中文字幕| 精品福利一区二区三区免费视频| 久久99精品久久久久婷婷| 久久这里只精品最新地址| 国产精品一级片在线观看| 成人免费在线视频观看| 在线观看日产精品| 捆绑调教美女网站视频一区| 久久久久久亚洲综合| 91视视频在线观看入口直接观看www | 精品国产sm最大网站免费看| 国产成人亚洲精品青草天美| 亚洲另类春色校园小说| 欧美妇女性影城| 国产精品自拍毛片| 亚洲在线中文字幕| 久久精品一区二区三区四区| 91啪亚洲精品| 美女视频黄频大全不卡视频在线播放| 日本一区二区视频在线观看| 欧美午夜精品理论片a级按摩| 人人狠狠综合久久亚洲| 国产精品白丝在线| 欧美一区二区二区| 91视频观看视频| 久99久精品视频免费观看| 国产精品国产三级国产| 日韩写真欧美这视频| a在线播放不卡| 久久精品国产99久久6| 国产精品免费视频网站| 日韩欧美中文字幕精品| 91麻豆成人久久精品二区三区| 日本午夜一本久久久综合| 国产精品传媒视频| 亚洲精品在线一区二区| 欧美日韩精品欧美日韩精品一| 国产精品456| 青娱乐精品视频在线| 亚洲男人的天堂在线观看| 2014亚洲片线观看视频免费| 精品视频在线视频| 成人一区二区三区| 韩国理伦片一区二区三区在线播放| 亚洲在线观看免费视频| 中文在线资源观看网站视频免费不卡| 91麻豆精品91久久久久同性| 91视视频在线直接观看在线看网页在线看 | 亚洲精品国产视频| 中文字幕不卡一区| 精品国产乱码久久久久久闺蜜| 欧美日韩久久一区二区| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 日韩欧美黄色影院| 欧美亚洲综合一区| 色悠悠久久综合| a在线欧美一区| voyeur盗摄精品| 国产传媒日韩欧美成人| 国内外精品视频| 麻豆视频观看网址久久| 日本成人在线视频网站| 午夜亚洲国产au精品一区二区| 一个色综合网站| 亚洲激情网站免费观看| 亚洲素人一区二区| 亚洲欧美一区二区在线观看| 欧美国产综合一区二区| 日本一区二区电影| 国产精品久久久久久久久图文区| 久久久www成人免费无遮挡大片| 精品少妇一区二区三区在线播放 | 亚洲va欧美va国产va天堂影院| 亚洲欧美另类在线| 一区二区三区四区国产精品| 一区二区三区在线观看动漫| 亚洲激情校园春色| 亚洲午夜电影在线| 日韩综合一区二区| 麻豆精品一区二区综合av| 日本成人在线不卡视频| 韩国女主播一区| 成人av资源在线观看| 91麻豆swag| 7777精品伊人久久久大香线蕉| 91精品久久久久久久久99蜜臂| 91精品国产综合久久小美女| 精品精品欲导航| 国产欧美一二三区| 一区二区三区日韩精品视频| 亚洲va中文字幕| 韩国欧美国产1区| 99麻豆久久久国产精品免费| 91国产视频在线观看| 在线综合亚洲欧美在线视频| 337p日本欧洲亚洲大胆精品| 中文字幕高清不卡| 亚洲国产va精品久久久不卡综合| 日韩福利视频网| 国产成人亚洲综合a∨婷婷图片| 91美女在线视频| 777色狠狠一区二区三区| 久久先锋影音av鲁色资源网| 亚洲美女淫视频| 麻豆国产精品官网| 99热这里都是精品| 欧美一级淫片007| 亚洲欧洲精品一区二区精品久久久| 一区二区久久久久| 韩国精品主播一区二区在线观看 | 伊人色综合久久天天人手人婷| 日韩精品一区第一页| 成人综合在线网站| 欧美日韩三级在线| 中文字幕免费不卡在线| 日韩高清在线不卡| 97精品久久久久中文字幕| 884aa四虎影成人精品一区| 国产精品毛片久久久久久久| 亚洲亚洲人成综合网络| 国产精一区二区三区| 色www精品视频在线观看| 久久影院视频免费| 午夜欧美电影在线观看| 国产成人aaa| 日韩欧美国产一区二区在线播放 | 高清成人在线观看| 日韩写真欧美这视频| 中文字幕乱码久久午夜不卡| 日韩电影免费在线观看网站| 9i看片成人免费高清| 日韩视频一区二区在线观看| 欧美激情中文字幕一区二区| 91色综合久久久久婷婷| 亚洲视频免费在线观看| 国产精品网站在线| 六月丁香婷婷久久| 欧美视频在线播放| 亚洲天堂2016| 成人午夜私人影院| 久久久久97国产精华液好用吗| 丝袜国产日韩另类美女| 色狠狠综合天天综合综合| 亚洲国产精品精华液2区45| 国产一区二区三区不卡在线观看| 777奇米成人网| 丝袜亚洲另类欧美| 欧美少妇bbb| 亚洲综合色婷婷| 日本韩国欧美一区二区三区| 国产精品欧美久久久久无广告 | 久久先锋影音av鲁色资源网| 日韩二区三区在线观看| 欧美日韩国产美| 亚洲无人区一区| 欧美视频在线一区二区三区| 亚洲精品日韩专区silk| 97精品久久久久中文字幕| 中文字幕中文在线不卡住| 国产91丝袜在线观看| 久久老女人爱爱| 福利一区二区在线观看| 国产日产亚洲精品系列| 国产成人aaa| 一区免费观看视频| 91麻豆精品在线观看| 一区二区三区四区在线播放| 在线视频欧美精品| 香港成人在线视频| 欧美疯狂做受xxxx富婆| 日本美女视频一区二区| 日韩一区二区免费高清| 久久狠狠亚洲综合| 久久久蜜桃精品| jlzzjlzz亚洲女人18| 亚洲欧美国产毛片在线| 欧美视频一区二区三区| 日韩avvvv在线播放| 久久天天做天天爱综合色| 国产成人在线电影| 一区二区三区在线免费视频| 欧美日韩国产电影| 美腿丝袜亚洲一区| 亚洲国产精品精华液ab| 在线综合亚洲欧美在线视频| 精品一区二区三区免费毛片爱| 久久久九九九九| 色综合久久久久综合| 丝袜诱惑亚洲看片| 国产日韩欧美一区二区三区综合| 99在线精品观看| 日韩中文字幕麻豆| 国产亚洲制服色| 欧洲色大大久久| 麻豆国产91在线播放| 中文字幕在线不卡视频| 欧美日韩国产美女|