亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美日韩黄色一区二区| 欧美日韩一二三区| 一区二区三区在线视频观看| 欧美精品精品一区| 国产精品一区在线观看乱码| 亚洲乱码一区二区三区在线观看| 这里只有精品视频在线观看| 国产一区二区成人久久免费影院| 国产亚洲综合在线| 欧美三级三级三级| 国产成人99久久亚洲综合精品| 亚洲自拍与偷拍| 久久久午夜电影| 欧美四级电影网| 粉嫩一区二区三区性色av| 亚洲不卡一区二区三区| 中文字幕欧美激情一区| 欧美人伦禁忌dvd放荡欲情| 极品少妇xxxx精品少妇偷拍| 亚洲欧美国产高清| 国产日产欧美一区二区视频| 欧美日韩在线直播| 成人av网站大全| 国内精品久久久久影院色| 亚洲一区二三区| 国产欧美日韩一区二区三区在线观看| 欧美日韩中文字幕精品| av亚洲精华国产精华| 久久精品99久久久| 日韩主播视频在线| 亚洲另类春色校园小说| ww亚洲ww在线观看国产| 色婷婷亚洲综合| 国产成人精品一区二| 美洲天堂一区二卡三卡四卡视频| 亚洲色图制服丝袜| 国产精品全国免费观看高清 | 成人精品免费看| 日韩电影在线免费观看| 一区二区三区国产豹纹内裤在线| 亚洲精品在线观看网站| 7777精品伊人久久久大香线蕉完整版| 色综合久久88色综合天天| 国产91在线观看| 国产成人啪免费观看软件| 国产一区二区导航在线播放| 麻豆视频一区二区| 午夜久久电影网| 一区二区三区免费看视频| 中文字幕在线不卡| 国产精品视频线看| 久久久久久久精| 久久久久久久久久久99999| 欧美日韩成人在线| 欧美日韩精品一区视频| 欧美日韩中字一区| 在线播放视频一区| 69堂精品视频| 777xxx欧美| 在线精品视频一区二区| 欧美亚洲禁片免费| 欧美在线free| 欧美日韩国产另类不卡| 欧美日韩1234| 日韩欧美亚洲一区二区| 欧美岛国在线观看| 26uuu精品一区二区三区四区在线| 欧美一区中文字幕| 日韩免费高清av| 久久久久久久久伊人| 亚洲精品一区二区三区精华液| 欧美成人精品3d动漫h| 日韩免费成人网| 国产三级欧美三级日产三级99| 精品国产一区二区三区忘忧草| 欧美精品一区二区三区在线播放 | 国内精品自线一区二区三区视频| 九九热在线视频观看这里只有精品| 久久99久久99| 久久精品国产亚洲5555| 精一区二区三区| 成人综合婷婷国产精品久久蜜臀 | 午夜免费久久看| 久久国产人妖系列| 成人综合激情网| 欧美综合在线视频| 日韩免费观看2025年上映的电影 | 亚洲一区二区三区自拍| 日韩av中文在线观看| 亚瑟在线精品视频| 精品一区二区影视| 不卡大黄网站免费看| 欧美日韩另类国产亚洲欧美一级| 精品理论电影在线| 亚洲色图在线视频| 免费日韩伦理电影| 久久国产精品免费| 波多野结衣精品在线| 欧美一a一片一级一片| 精品国产第一区二区三区观看体验| 国产精品色一区二区三区| 亚洲综合精品久久| 国产精品综合一区二区三区| 成人开心网精品视频| 777久久久精品| 国产精品久久国产精麻豆99网站| 亚欧色一区w666天堂| 成人国产精品免费观看| 91美女片黄在线观看91美女| 精品区一区二区| 亚洲自拍偷拍网站| 国产999精品久久| 日韩欧美国产综合| 亚洲综合久久久| 国产精品影视网| 欧亚洲嫩模精品一区三区| 久久久国产一区二区三区四区小说 | 欧亚洲嫩模精品一区三区| 2014亚洲片线观看视频免费| 日韩不卡免费视频| 91精品国产乱码| 三级不卡在线观看| 欧美日韩一区久久| 亚洲一二三四在线观看| 色综合久久中文字幕综合网| 国产精品的网站| 99精品视频一区| 国产精品乱码久久久久久| 国产 欧美在线| 国产精品欧美一级免费| 国产成人亚洲综合a∨婷婷图片 | 精品人在线二区三区| 免费成人av在线播放| 日韩一级二级三级精品视频| 视频一区二区不卡| 91精品国产高清一区二区三区蜜臀| 无码av免费一区二区三区试看| 色婷婷综合久久久中文一区二区| 亚洲欧美激情小说另类| 91官网在线免费观看| 一区二区三区精品在线| 欧美三级视频在线播放| 日韩成人av影视| 日韩女优制服丝袜电影| 国产精品一区二区在线看| 中文文精品字幕一区二区| av电影一区二区| 亚洲一区二区综合| 欧美一二三在线| 国产一区91精品张津瑜| 一色桃子久久精品亚洲| 色婷婷一区二区| 无码av中文一区二区三区桃花岛| 日韩视频不卡中文| 国产精品亚洲第一| 日韩毛片精品高清免费| 欧美日韩高清不卡| 九九**精品视频免费播放| 国产精品久久久久影院| 色妹子一区二区| 日韩不卡一二三区| 国产欧美一区二区在线| 91久久精品日日躁夜夜躁欧美| 日韩av高清在线观看| 国产女人水真多18毛片18精品视频| 成人一级视频在线观看| 亚洲一二三级电影| 精品噜噜噜噜久久久久久久久试看| 风间由美一区二区三区在线观看 | 国产精品亲子伦对白| 在线免费观看日韩欧美| 精品亚洲欧美一区| 中文字幕亚洲综合久久菠萝蜜| 欧美日韩情趣电影| 国产精品亚洲视频| 亚洲韩国精品一区| 国产色婷婷亚洲99精品小说| 欧洲精品一区二区三区在线观看| 美美哒免费高清在线观看视频一区二区 | 亚洲午夜久久久久久久久久久| 欧美va亚洲va| 91久久奴性调教| 国产激情偷乱视频一区二区三区| 亚洲精品美国一| 久久精品人人做人人综合| 欧美日韩国产免费一区二区| 成人午夜av影视| 日本不卡一区二区三区高清视频| 国产精品私人影院| 日韩美女一区二区三区四区| 91麻豆高清视频| 国产毛片精品视频| 日韩精品91亚洲二区在线观看| 国产欧美日韩另类一区| 91精品中文字幕一区二区三区| 99免费精品视频| 国产毛片精品一区| 蜜芽一区二区三区| 亚洲一区在线观看免费观看电影高清 | 国产一区三区三区|