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

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

?? ratecontrolledrouter.java

?? 中間件開發(fā)詳細說明:清華大學J2EE教程講義(ppt)-Tsinghua University J2EE tutorial lectures (ppt) [上載源碼成為會員下載此源碼] [成為VIP會
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * ** 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 * * RateControlledRouter.java - Simulates a network router with RIP as the * advertising protocol * */package gridsim.net;import gridsim.net.*;import eduni.simjava.*;import gridsim.*;import gridsim.util.*;import java.util.*;/** * Use this router only in conjunction with an active packet scheduler, such as * the {@link gridsim.net.RateControlledScheduler} entity. * <p> * This class implements a Router using a form of RIP for routing. The routing * protocol used here is similar to <a * href="http://www.ietf.org/rfc/rfc1058.txt">Routing Information Protocol * (RIP) </a>. The routing protocol is run before Gridlets etc. can be * submitted. * <p> * In case there are more than two routes to a destination, the * route with the lower hopcount is used. Since in this simulation routers * relay perfect information and links do not break down, RIP should be a * reliable protocol to use. * * @invariant $none * @since GridSim Toolkit 4.0 * @author Gokul Poduval & Chen-Khong Tham, National University of Singapore */public class RateControlledRouter extends Router{    private Hashtable linkTable_;       // table of Link entities    private Hashtable schedTable_;      // table of schedulers    private Hashtable hostTable_;       // table of hosts, such as routers, etc    private Hashtable routerTable_;     // table of routers    private Hashtable forwardTable_;    // a routing table    private static final int BITS = 8;     // 1 byte in bits    /**     * Creates a new Router object. By default, <b>no recording or logging</b>     * is done for packets' activities. If you want to log operations of this     * entity, please use {@link #RateControlledRouter(String, boolean)}.     * <br>     * Use this router only in conjunction with an active packet scheduler,     * such as the {@link gridsim.net.RateControlledScheduler} entity.     *     * @param name Name of this router     * @throws NullPointerException This happens when name is empty or null     * @see #RateControlledRouter(String, boolean)     * @see gridsim.net.RateControlledScheduler     * @pre name != null     * @post $none     */    public RateControlledRouter(String name) throws NullPointerException {        this(name, false);    }    /**     * Creates a new Router object with logging facility if it is turned on.     * Use this router only in conjunction with an active packet scheduler,     * such as the {@link gridsim.net.RateControlledScheduler} entity.     * <br>     * NOTE: If logging facility is turned on, there are some overheads     * in terms of performance and memory consumption.     *     * @param name      Name of this router     * @param trace     <tt>true</tt> if you want to record this router's     *                  activity, <tt>false</tt> otherwise     * @throws NullPointerException This happens when name is empty or null     * @see gridsim.net.RateControlledScheduler     * @pre name != null     * @post $none     */    public RateControlledRouter(String name, boolean trace) throws NullPointerException    {        super(name, trace);        init();    }    /**     * Initialises all variables     * @pre $none     * @post $none     */    private void init()    {        linkTable_ = new Hashtable();        hostTable_ = new Hashtable();        routerTable_ = new Hashtable();        forwardTable_ = new Hashtable();        schedTable_ = new Hashtable();    }    /**     * Joins two routers with a Link.     * @param router    The router on the other side to which this one will     *                  be attached.     * @param link      This is the link that will be used to connect the two     *                  routers.     * @param thisSched The scheduling policy used on this routers egress port     *                  when sending data through it.     * @param otherSched    The scheduling policy that will be used on the     *                      egress port of the router being connected to when     *                      sending data to this router.     * @pre router != null     * @pre link != null     * @pre thisSched != null     * @pre otherSched != null     * @post $none     */    public void attachRouter(Router router, Link link,                    PacketScheduler thisSched, PacketScheduler otherSched)    {        String msg = super.get_name() + ".attachRouter(): Error - ";        if (router == null)        {            System.out.println(msg + "the router is null.");            return;        }        if (link == null)        {            System.out.println(msg + "the link is null.");            return;        }        if (thisSched == null || otherSched == null)        {            System.out.println(msg +                    "the one or more packet schedulers are null.");            return;        }        thisSched.setBaudRate( link.getBaudRate() );        otherSched.setBaudRate( link.getBaudRate() );        link.attach(this, router);        this.attachRouter(router, link, thisSched);        router.attachRouter(this, link, otherSched);    }    /**     * Joins two routers together. This is called by the routers themselves     * and should not be called by other entities.     *     * @param router    The Router to which this router will be connected.     * @param link      The Link that will be used to join these routers.     * @param sched     The scheduling policy used on the egress port of the     *                  router when sending data through this route.     * @pre router != null     * @pre link != null     * @pre sched != null     * @post $none     */    public void attachRouter(Router router, Link link, PacketScheduler sched)    {        String msg = super.get_name() + ".attachRouter(): Error - ";        if (router == null)        {            System.out.println(msg + "the router is null.");            return;        }        if (link == null)        {            System.out.println(msg + "the link is null.");            return;        }        if (sched == null)        {            System.out.println(msg + "the packet scheduler is null.");            return;        }        linkTable_.put(router.get_name(), link.get_name());        if (!schedTable_.containsKey( link.get_name()) ) {            schedTable_.put(link.get_name(), sched);        }        routerTable_.put( link.get_name(), router.get_name() );        hostTable_.put( link.get_name(), router.get_name() );        sched.setRouterID( super.get_id() );  // tells the pkt scheduler        // logging or recording ...        if (reportWriter_ != null)        {            StringBuffer sb = null;            sb = new StringBuffer("attach this ROUTER, with router, ");            sb.append( router.get_name() );            sb.append(", with link, ");            sb.append( link.get_name() );            sb.append(", with packet scheduler, ");            sb.append( sched.getSchedName() );            super.write( sb.toString() );        }    }    /**     * Attaches an entity to this router. The link between the router and the     * entity being attached is taken from     * {@link gridsim.GridSimCore#getLink()}.     *     * @param entity    The entity to be attached.     * @param sched     The scheduling policy that will be used on the egress     *                  port when the router sends data to the entity being     *                  joined.     * @see gridsim.GridSimCore#getLink()     * @pre entity != null     * @pre sched != null     * @post $none     */    public void attachHost(GridSimCore entity, PacketScheduler sched)    {        String msg = super.get_name() + ".attachHost(): Error - ";        if (entity == null)        {            System.out.println(msg + "the entity is null.");            return;        }        if (sched == null)        {            System.out.println(msg + "the packet scheduler is null.");            return;        }        Link link = entity.getLink();        sched.setBaudRate( link.getBaudRate() );        sched.setRouterID( super.get_id()) ;        link.attach(this, entity);        linkTable_.put( entity.get_name(), link.get_name() );        hostTable_.put( link.get_name(), entity.get_name() );        if (!schedTable_.containsKey( link.get_name() )) {            schedTable_.put(link.get_name(), sched);        }        // recording ...        if (reportWriter_ != null)        {            StringBuffer sb = null;            sb = new StringBuffer("attach this ROUTER, to entity, ");            sb.append( entity.get_name() );            sb.append(", with packet scheduler, ");            sb.append( sched.getSchedName() );            super.write( sb.toString() );        }    }    /**     * Processes incoming events     * @param ev    a Sim_event object     * @pre ev != null     * @post $none     */    protected synchronized void processEvent(Sim_event ev)    {        switch ( ev.get_tag() )        {            case GridSimTags.PKT_FORWARD:            case GridSimTags.JUNK_PKT:                processNetPacket( ev, ev.get_tag() );                break;            case GridSimTags.ROUTER_AD:                receiveAd(ev);                break;            case GridSimTags.SCHEDULER_DEQUE:                this.dequeue(ev);                break;            default:                System.out.println(super.get_name() + ".body(): Unable to " +                        "handle request from GridSimTags " +                        "with constant number " + ev.get_tag() );                break;        }    }    /**     * Processes incoming network packets, one at a time.     * The incoming packet will be split up into smaller pieces if     * the packet size > MTU of the other end.     *     * @param ev    a Sim_event object     * @pre ev != null     * @post $none     */    private synchronized void processNetPacket(Sim_event ev, int tag)    {        double nextTime = 0;        Packet pkt = (Packet) ev.get_data();        PacketScheduler sched = getScheduler(pkt);        // if a packet scheduler is not found, then try reschedule this packet        // in the future        if (sched == null)        {            System.out.println(super.get_name() + ".processNetPacket(): " +                "Warning - can't find a packet scheduler for " + pkt);            System.out.println("-> Will reschedule it again in the future.");            super.sim_schedule(super.get_id(), Router.DELAY, tag, pkt);            return;        }        // process ping() request        if (pkt instanceof InfoPacket)        {            ((InfoPacket) pkt).addHop( super.get_id() );            ((InfoPacket) pkt).addEntryTime( GridSim.clock() );            ((InfoPacket) pkt).addBaudRate(sched.getBaudRate());        }        // check downlink MTU, and split accordingly        String linkName = getLinkName( pkt.getDestID() );        Link downLink = (Link) Sim_system.get_entity(linkName);        int MTU = downLink.getMTU();        int numPackets = (int) Math.ceil(pkt.getSize() / (MTU * 1.0));        // log / record ....        if (super.reportWriter_ != null)        {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人动漫中文字幕| 欧美精品一区二区三区在线| 欧美日韩一区二区电影| 欧美日韩成人综合天天影院 | 视频一区二区国产| 男女性色大片免费观看一区二区| 一区二区三区在线观看欧美| 日本大胆欧美人术艺术动态| 国产一区999| 色吧成人激情小说| 欧美精品在线观看一区二区| 精品动漫一区二区三区在线观看| 日韩一区二区三区免费看| 久久先锋影音av鲁色资源网| 久久免费偷拍视频| 亚洲少妇屁股交4| 日韩黄色免费网站| 五月婷婷色综合| 国产主播一区二区三区| 99久久精品免费| 在线成人小视频| 国产精品视频一区二区三区不卡| 久久亚洲一级片| 天堂va蜜桃一区二区三区漫画版| 国产在线观看一区二区| 欧美日本在线视频| 亚洲人成精品久久久久| 国产iv一区二区三区| 日韩一区二区视频| 日韩一区精品字幕| 欧美吞精做爰啪啪高潮| 中文欧美字幕免费| 国产99久久久久久免费看农村| 91麻豆精品国产91久久久| 一区二区三区在线视频免费观看 | 久久爱www久久做| 大陆成人av片| 国产亚洲福利社区一区| 婷婷六月综合网| 在线电影国产精品| 久久精品久久99精品久久| 欧美一二三区精品| 国产在线精品免费| 欧美激情一区二区三区蜜桃视频| 奇米影视在线99精品| 欧美美女直播网站| 美女被吸乳得到大胸91| 2021久久国产精品不只是精品| 亚洲成av人片一区二区| 日韩欧美国产1| 国产伦理精品不卡| 国产精品美女一区二区三区| 91麻豆视频网站| 亚洲国产另类精品专区| 精品日韩99亚洲| 成人爱爱电影网址| 亚洲国产成人高清精品| 日韩欧美成人午夜| 91免费视频网| 秋霞国产午夜精品免费视频| 国产日韩在线不卡| 色老头久久综合| 狠狠色丁香九九婷婷综合五月 | 2014亚洲片线观看视频免费| 99久久精品免费精品国产| 奇米777欧美一区二区| 国产精品美女www爽爽爽| 欧美午夜电影网| 丁香六月综合激情| 免费人成精品欧美精品| 亚洲图片另类小说| 日韩视频123| 欧美另类videos死尸| av激情成人网| 国产一区二区三区在线观看免费| 亚洲欧美激情在线| 久久久久久久久久电影| 欧美日韩成人激情| 日本精品一区二区三区四区的功能| 五月天国产精品| 亚洲与欧洲av电影| 亚洲视频免费看| 国产精品成人一区二区艾草| 精品乱码亚洲一区二区不卡| 欧美日韩久久久| 欧美影片第一页| 在线观看日韩一区| 色综合激情久久| 国产**成人网毛片九色 | 国产精品初高中害羞小美女文| 欧美日韩一区二区在线观看视频 | av电影天堂一区二区在线观看| 亚洲第一激情av| 亚洲成人综合网站| 亚洲一区二区三区四区在线免费观看| 日韩西西人体444www| 欧美一区二区三区免费大片 | 亚洲欧美日韩成人高清在线一区| 久久久一区二区三区捆绑**| 欧美一区2区视频在线观看| 日韩午夜中文字幕| 国产区在线观看成人精品| 国产精品嫩草久久久久| 亚洲欧美偷拍卡通变态| 一区二区三区在线观看动漫 | 欧美视频精品在线观看| 欧美唯美清纯偷拍| 精品国产精品一区二区夜夜嗨 | 中文字幕免费一区| 亚洲激情校园春色| 久久99精品视频| 成人免费视频免费观看| 色哦色哦哦色天天综合| 欧美另类一区二区三区| 国产精品视频第一区| 亚洲制服丝袜av| 国产乱码精品一品二品| 91欧美激情一区二区三区成人| 成人福利视频网站| 日韩精品一区二区在线| 亚洲人成精品久久久久| 日本不卡123| 在线观看国产91| 国产欧美日韩精品a在线观看| 国产精品国产成人国产三级| 亚洲第一在线综合网站| 懂色av一区二区在线播放| 日韩你懂的电影在线观看| 亚洲人123区| 欧洲亚洲精品在线| 国产亚洲精品久| 麻豆久久久久久| 在线中文字幕一区二区| 中文字幕久久午夜不卡| 麻豆国产精品视频| 欧美二区乱c少妇| 夜夜精品浪潮av一区二区三区| 精品一区免费av| 欧美成人综合网站| 热久久国产精品| 欧美一区二区精品久久911| 亚洲综合清纯丝袜自拍| 色综合久久久久综合| 成人免费在线播放视频| 成人一级视频在线观看| 国产精品网站在线| 成人一二三区视频| 国产精品久久久久久久久动漫 | 91国模大尺度私拍在线视频| 中文一区一区三区高中清不卡| 日韩高清不卡在线| 日韩欧美一区二区免费| 久久99国产精品成人| 2020国产精品久久精品美国| 国产一区二区免费在线| 欧美激情一区二区在线| 成人三级在线视频| 亚洲一区二区三区在线| 欧美日韩精品欧美日韩精品一综合| ...xxx性欧美| 欧美专区日韩专区| 秋霞电影网一区二区| 欧美v国产在线一区二区三区| 免费人成在线不卡| 国产欧美精品国产国产专区| 91麻豆swag| 精品一区二区在线看| 国产精品久久久99| 制服丝袜中文字幕一区| 国产一区二区三区观看| 一区免费观看视频| 欧美一区二区视频网站| av中文字幕在线不卡| 蜜芽一区二区三区| 亚洲欧美在线观看| 日韩亚洲欧美在线| 99久久99久久精品国产片果冻 | 蜜臀av性久久久久蜜臀aⅴ| 国产人成一区二区三区影院| 欧美日韩精品一区视频| 国内精品视频一区二区三区八戒| 国产精品国模大尺度视频| 欧美一区永久视频免费观看| av电影在线观看不卡| 精品一区二区三区蜜桃| 一区二区欧美精品| 中文字幕一区二区在线观看 | 亚洲精品在线观看网站| 欧美三级蜜桃2在线观看| 国产一区二区主播在线| 玖玖九九国产精品| 亚洲自拍与偷拍| 亚洲精品国久久99热| 国产片一区二区三区| 精品乱人伦小说| 久久影视一区二区| 久久影院午夜论| 国产亚洲福利社区一区| 26uuu国产在线精品一区二区| 91久久人澡人人添人人爽欧美|