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

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

?? ratecontrolledrouter.java

?? 實現網格環境下資源調度和分配的仿真
?? 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一区二区三区免费野_久草精品视频
亚洲午夜国产一区99re久久| 欧美亚洲国产一区二区三区 | 成人激情电影免费在线观看| 久久综合精品国产一区二区三区 | 国产露脸91国语对白| 国产日韩欧美一区二区三区乱码| 国产一区二区日韩精品| 久久精品亚洲精品国产欧美kt∨| 国产精一品亚洲二区在线视频| 久久久久国产精品厨房| 国产成人精品影视| 亚洲激情图片qvod| 欧美一区二区三区色| 精品午夜一区二区三区在线观看| 国产日产欧美一区| 91视频一区二区三区| 丝瓜av网站精品一区二区| 精品少妇一区二区三区在线视频| 国产99久久久久| 亚洲综合丝袜美腿| 精品国产乱码久久久久久牛牛 | 欧美日韩www| 国产精品女同互慰在线看| 一级日本不卡的影视| 黄色成人免费在线| 99久久免费国产| 欧美大片在线观看| 亚洲国产精品欧美一二99| 国产呦精品一区二区三区网站| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 国产精品高潮呻吟久久| 91香蕉视频在线| 日韩国产欧美在线播放| 国产日韩欧美a| 欧美挠脚心视频网站| 国产又黄又大久久| 亚洲夂夂婷婷色拍ww47| 国产日韩视频一区二区三区| 欧美性猛交xxxx黑人交| 国产丶欧美丶日本不卡视频| 国产成人精品综合在线观看| 一本久道中文字幕精品亚洲嫩| 亚洲激情男女视频| 蜜桃视频一区二区三区| 高清不卡一区二区在线| 制服.丝袜.亚洲.中文.综合| 国产喷白浆一区二区三区| 精品一区二区成人精品| 精品免费视频.| 久久99这里只有精品| 国产欧美综合在线观看第十页| 风间由美性色一区二区三区| 欧美一区二区三区爱爱| 91麻豆精品国产91久久久使用方法| 精品对白一区国产伦| 狠狠狠色丁香婷婷综合激情| 亚洲一线二线三线视频| 在线播放/欧美激情| 久久久久久久久久久久久久久99 | 精品日产卡一卡二卡麻豆| 欧美一区二区国产| 亚洲国产欧美在线人成| 欧美视频一区二区三区在线观看 | 亚洲精品一线二线三线| 日韩高清不卡一区二区| 亚洲欧美精品午睡沙发| 欧美福利电影网| 99视频一区二区三区| 欧美日韩国产一区二区三区地区| 一级特黄大欧美久久久| 一区二区三区欧美日韩| 亚洲欧洲日韩女同| 国产精品美日韩| 国产精品麻豆欧美日韩ww| 久久久亚洲综合| 国产片一区二区三区| 国产欧美精品一区| 亚洲国产精品黑人久久久| 久久久精品日韩欧美| 国产亚洲欧美日韩日本| 久久精品日产第一区二区三区高清版| 日韩精品一区二区三区中文不卡 | 欧美在线|欧美| 欧美亚洲国产一区在线观看网站| 色综合久久久久网| 欧美亚洲综合一区| 欧美日韩激情一区二区三区| 欧美色爱综合网| 欧美日韩aaa| 日韩精品一区二区三区老鸭窝| 欧美tickle裸体挠脚心vk| 久久免费精品国产久精品久久久久| www欧美成人18+| 国产精品免费久久久久| 中文字幕一区在线观看视频| 亚洲精品videosex极品| 午夜私人影院久久久久| 免费成人你懂的| 国产精品2024| 色婷婷综合五月| 欧美日本国产一区| 欧美精品一区二区久久婷婷| 国产人伦精品一区二区| 亚洲视频免费在线| 日韩影视精彩在线| 国产精品一区二区久久不卡| 91在线一区二区三区| 欧美军同video69gay| 久久一区二区三区四区| 中文字幕在线播放不卡一区| 日韩精品久久久久久| 国产精品白丝jk白祙喷水网站| 色综合久久久久| 日韩欧美国产高清| 亚洲欧洲一区二区三区| 日韩成人一区二区三区在线观看| 国产一区二区三区免费| 欧洲一区二区三区免费视频| 日韩一二三四区| 亚洲男人的天堂av| 老司机免费视频一区二区| 99久久精品免费看国产免费软件| 7777精品伊人久久久大香线蕉最新版| 久久久久9999亚洲精品| 亚洲一区二区三区四区在线观看| 极品少妇xxxx偷拍精品少妇| 91麻豆国产香蕉久久精品| 欧美成人三级在线| 亚洲午夜电影在线观看| 成人免费视频一区| 欧美一二区视频| 一区二区三区美女视频| 国产成人av自拍| 欧美一级黄色录像| 一区二区三区色| 国产.精品.日韩.另类.中文.在线.播放| 欧美亚州韩日在线看免费版国语版| 2019国产精品| 日日夜夜免费精品视频| 91小视频免费看| 欧美国产一区二区| 国产一区激情在线| 91精品黄色片免费大全| 亚洲欧美日韩国产手机在线| 国产成人综合精品三级| 日韩午夜小视频| 日韩精品一级中文字幕精品视频免费观看 | 亚洲欧美日韩国产一区二区三区| 韩国精品免费视频| 欧美一级免费观看| 亚洲成人自拍偷拍| 在线观看国产91| 亚洲欧美另类综合偷拍| www.av亚洲| 中文字幕一区二区三区精华液| 国产精品主播直播| 久久久久久免费网| 国产精品一线二线三线| 2023国产精品| 国产精品一二三四| 久久久久久久电影| 国产一区二区主播在线| 欧美大度的电影原声| 久久精品国产77777蜜臀| 91麻豆精品国产91久久久资源速度 | 视频一区在线播放| 欧美三级中文字| 亚洲成人av中文| 717成人午夜免费福利电影| 午夜精品久久久久久久99水蜜桃| 欧美日韩在线电影| 午夜精品成人在线| 欧美一二三四区在线| 久久精品国产精品亚洲综合| 欧美www视频| 成人免费视频app| 亚洲视频一区二区在线观看| 日本精品裸体写真集在线观看| 亚洲伦在线观看| 欧美日韩免费观看一区三区| 日韩在线播放一区二区| 日韩欧美成人一区二区| 国产一区二区三区精品欧美日韩一区二区三区 | 国产精品久久久久久户外露出| 99精品偷自拍| 婷婷久久综合九色国产成人| 欧美一级专区免费大片| 国产高清不卡二三区| 亚洲欧美综合网| 欧美亚洲动漫精品| 麻豆一区二区在线| 国产亚洲午夜高清国产拍精品| aaa欧美大片| 午夜精品国产更新| 国产三级欧美三级日产三级99| 成人精品国产福利| 亚洲成在人线在线播放| 久久久久久久精| 欧美综合视频在线观看| 蜜臀久久99精品久久久久久9|