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

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

?? gridsim.java

?? 一個非常著名的網格模擬器,能夠運行網格調度算法!
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
            int[] array = (int[]) ev.get_data();            result = array[RESULT];        }        catch (Exception e) {            result = -1;        }        return result;    }    /**     * Gets a Gridlet belong to the first event <b>CURRENTLY</b> waiting in this     * entity's deferred queue (incoming buffer).     * If there are no events, then wait indefinitely for an event to arrive.     * @return A Gridlet object or <tt>null</tt> if an error occurs.     * @deprecated As of GridSim 2.1, replaced by {@link #gridletReceive()}     * @pre $none     * @post $none     */    protected Gridlet GridletReceive() {        return gridletReceive();    }    /**     * Gets a Gridlet belong to the first event <b>CURRENTLY</b> waiting in this     * entity's deferred queue (incoming buffer).     * If there are no events, then wait indefinitely for an event to arrive.     * @return A Gridlet object or <tt>null</tt> if an error occurs.     * @pre $none     * @post $none     */    protected Gridlet gridletReceive()    {        Sim_event ev = new Sim_event();        // waiting for a response from the GridResource entity        Sim_type_p tag = new Sim_type_p(GridSimTags.GRIDLET_RETURN);        super.sim_get_next(tag, ev);   // wait for the correct event type        Gridlet gl = null;        try {            gl = (Gridlet) ev.get_data();        }        catch (ClassCastException c) {            gl = null;        }        catch (Exception e) {            gl = null;        }        return gl;    }    /**     * Gets a Gridlet belong to the first event <b>CURRENTLY</b> waiting in this     * entity's deferred queue (incoming buffer).     * If there are no events, then wait indefinitely for an event to arrive.     * @param gridletId   a Gridlet ID     * @param userId      a user ID     * @param resId       a grid resource ID     * @return A Gridlet object or <tt>null</tt> if an error occurs.     * @pre gridletId >= 0     * @pre userId > 0     * @pre resId > 0     * @post $none     */    protected Gridlet gridletReceive(int gridletId, int userId, int resId)    {        String errorMsg = super.get_name() + ".gridletReceive(): ";        boolean valid = validateValue(errorMsg, gridletId, userId, resId);        if (valid == false) {            return null;        }        // waiting for a response from the GridResource entity        FilterGridlet tag = new FilterGridlet(gridletId, userId, resId);        // only look for this type of ack for same Gridlet ID        Sim_event ev = new Sim_event();        super.sim_get_next(tag, ev);        Gridlet gl = null;        try {            gl = (Gridlet) ev.get_data();        }        catch (ClassCastException c) {            gl = null;        }        catch (Exception e) {            gl = null;        }        return gl;    }    /**     * Gets a Gridlet belong to the first event <b>CURRENTLY</b> waiting in this     * entity's deferred queue (incoming buffer).     * If there are no events, then wait indefinitely for an event to arrive.     * @param gridletId   a Gridlet ID     * @param resId       a grid resource ID     * @return A Gridlet object or <tt>null</tt> if an error occurs.     * @pre gridletId >= 0     * @pre resId > 0     * @post $none     */    protected Gridlet gridletReceive(int gridletId, int resId)    {        String errorMsg = super.get_name() + ".gridletReceive(): ";        boolean valid = validateValue(errorMsg,gridletId,super.get_id(),resId);        if (valid == false) {            return null;        }        // waiting for a response from the GridResource entity        FilterGridlet tag = new FilterGridlet(gridletId, resId);        // only look for this type of ack for same Gridlet ID        Sim_event ev = new Sim_event();        super.sim_get_next(tag, ev);        Gridlet gl = null;        try {            gl = (Gridlet) ev.get_data();        }        catch (ClassCastException c) {            gl = null;        }        catch (Exception e) {            gl = null;        }        return gl;    }    /**     * Sends a Gridlet based on their event tag to the destination resource ID.     * @param errorMsg   a message containing which operation it belongs to     * @param gridletId  a Gridlet ID     * @param userId     a Gridlet's user or owner ID     * @param resourceId    a GridResource ID     * @param delay      sending delay time     * @param tag        event tag (such as GridSimTags.GRIDLET_PAUSE, etc...)     * @param ack        denotes whether want to have an acknowledgment or not     * @return <tt>true</tt> if the Gridlet has been sent successfully,     *         <tt>false</tt> otherwise     * @pre errorMsg != null     * @pre gridletId > 0     * @pre userId > 0     * @pre resourceId > 0     * @pre delay >= 0.0     * @pre tag > 0     * @post $result = true || false     */    private boolean sendGridlet(String errorMsg, int gridletId, int userId,                           int resourceId, double delay, int tag, boolean ack)    {        boolean valid = validateValue(errorMsg, gridletId, userId, resourceId);        if (valid == false || delay < 0.0) {            return false;        }        int size = 14;  // size of having 3 ints + 2 bytes overhead        int[] array = new int[ARRAY_SIZE];        array[0] = gridletId;        array[1] = userId;        array[2] = NOT_FOUND;  // this index is only used by gridletMove()        // if an ack is required, then change the tag        int newTag = tag;        if (ack == true)        {            switch (tag)            {                case GridSimTags.GRIDLET_PAUSE:                    newTag = GridSimTags.GRIDLET_PAUSE_ACK;                    break;                case GridSimTags.GRIDLET_RESUME:                    newTag = GridSimTags.GRIDLET_RESUME_ACK;                    break;                default:                    break;            }        }        // send this Gridlet        send(super.output, delay, newTag, new IO_data(array, size, resourceId));        return true;    }    /**     * Performs validation of the given parameters before sending a Gridlet     * to a GridResource entity     * @param msg        a message containing which operation it belongs to     * @param gridletId  a Gridlet ID     * @param userId     a Gridlet's user or owner ID     * @param resourceId    a GridResource ID     * @return <tt>true</tt> if the validation has passed successfully,     *         <tt>false</tt> otherwise     * @pre msg != null     * @pre gridletId > 0     * @pre userId > 0     * @pre resourceId > 0     * @post $result = true || false     */    private boolean validateValue(String msg, int gridletId, int userId,                int resourceId)    {        boolean valid = true;        // Gridlet ID must be 0 or positive        if (gridletId < 0)        {            valid = false;            System.out.println(msg + "Error - Gridlet ID must be >= 0, not " +                    gridletId);        }        // User ID must be 0 or positive        if (userId < 0)        {            valid = false;            System.out.println(msg + "Error - User ID must be >= 0, not " +                    userId);        }        // GridResource ID must be 0 or positive        if (resourceId < 0)        {            valid = false;            System.out.println(msg +                    "Error - GridResource ID must be >= 0, not " + resourceId);        }        // if a grid resource ID doesn't exist in GIS list        if (gis_.isResourceExist(resourceId) == false)        {            valid = false;            System.out.println(msg + "Error - GridResource ID #" + resourceId +                               " doesn't exist");        }        return valid;    }    /**     * Cancels a Gridlet that is currently executing in a given GridResource     * ID <tt>with</tt> a delay. <br>     * <b>NOTE:</b> Canceling a Gridlet operation can take a long time over a     *              slow network if the Gridlet size is big.     * @param gl            a Gridlet object to be canceled     * @param resourceId    an unique resource ID     * @param delay         delay time or <tt>0.0</tt> if want to cancel NOW     * @return the canceled Gridlet or <tt>null</tt if this operation fails.     *         If a Gridlet has <tt>finished</tt> in time of cancellation, then     *         this method will return the finished Gridlet.     *         Canceling a Gridlet can be failed for the one or more     *         following reasons:     *         <ul>     *              <li> if a GridResource ID doesn't exist     *              <li> if a Gridlet ID doesn't exist     *              <li> if a Gridlet's user ID doesn't exist     *              <li> if the delay time is negative     *              <li> if a Gridlet object is <tt>null</tt> or empty;     *         </ul>     * @pre gl != null     * @pre resourceId >= 0     * @pre delay >= 0.0     * @post $none     */    protected Gridlet gridletCancel(Gridlet gl, int resourceId, double delay)    {        if (gl == null || delay < 0.0) {            return null;        }        Gridlet obj = gridletCancel( gl.getGridletID(), gl.getUserID(),                                    resourceId, delay );        return obj;    }    /**     * Cancels a Gridlet that is currently executing in a given GridResource     * ID <tt>with</tt> a delay. <br>     * <b>NOTE:</b> Canceling a Gridlet operation can be slow over a slow     *              network if the Gridlet size is big.     * @param gridletId     a Gridlet ID     * @param userId        the user or owner ID of this Gridlet     * @param resourceId    an unique resource ID to which this Gridlet was     *                      previously sent to     * @param delay         delay time or <tt>0.0</tt> if want to cancel NOW     * @return the canceled Gridlet or <tt>null</tt if this operation fails.     *         If a Gridlet has <tt>finished</tt> in time of cancellation, then     *         this method will return the finished Gridlet.     *         Canceling a Gridlet can be failed for the one or more     *         following reasons:     *         <ul>     *              <li> if a GridResource ID doesn't exist     *              <li> if a Gridlet ID doesn't exist     *              <li> if a Gridlet's user ID doesn't exist     *              <li> if the delay time is negative     *         </ul>     * @pre gridletId >= 0     * @pre userId >= 0     * @pre resourceId >= 0     * @pre delay >= 0.0     * @post $none     */    protected Gridlet gridletCancel(int gridletId, int userId, int resourceId,                                    double delay)    {        Gridlet gl = null;        String errorMsg = super.get_name() + ".gridletCancel(): ";        try        {            boolean valid = sendGridlet(errorMsg, gridletId, userId, resourceId,                                    delay, GridSimTags.GRIDLET_CANCEL, false);            if (valid == true)            {                // waiting for a response from the GridResource entity                FilterGridlet tag = new FilterGridlet(gridletId, resourceId);                tag.setTag(GridSimTags.GRIDLET_CANCEL);                // only look for this type of ack for same Gridlet ID                Sim_event ev = new Sim_event();                super.sim_get_next(tag, ev);                gl = (Gridlet) ev.get_data();                // if a gridlet comes with a failed status, it means that                // a resource could not find the gridlet                if (gl.getGridletStatus() == Gridlet.FAILED) {                    gl = null;                }            }        }        catch (Sim_exception e)        {            gl = null;            System.out.println(errorMsg + "Error occurs.");

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
综合久久国产九一剧情麻豆| 精品国产自在久精品国产| 中文字幕日韩一区二区| 99久久精品免费看| 亚洲激情自拍偷拍| 欧美乱妇一区二区三区不卡视频| 日韩精品一区第一页| 337p日本欧洲亚洲大胆精品| 国产麻豆日韩欧美久久| 中文字幕五月欧美| 欧美日本一道本| 免费在线视频一区| 国产精品久久久久一区二区三区 | 91原创在线视频| 亚洲一区二区三区中文字幕| 777a∨成人精品桃花网| 激情av综合网| 亚洲激情网站免费观看| 日韩免费高清av| 成人爱爱电影网址| 日韩电影在线观看网站| 日韩一区精品字幕| 91亚洲精品久久久蜜桃网站| 亚洲欧美怡红院| 99精品欧美一区| 亚洲女子a中天字幕| 99精品久久久久久| 亚洲黄色尤物视频| 欧美四级电影在线观看| 亚洲五码中文字幕| 91精彩视频在线| 亚洲国产精品人人做人人爽| 欧洲国内综合视频| 一区二区三区在线影院| 在线看日韩精品电影| 亚洲主播在线观看| 欧美日韩精品一区视频| 日本欧美韩国一区三区| 精品成a人在线观看| 国内精品写真在线观看| 亚洲国产岛国毛片在线| 成人一级片网址| 亚洲欧美一区二区三区国产精品| 91欧美一区二区| 亚洲乱码一区二区三区在线观看| 色综合久久88色综合天天免费| 一区二区三区四区在线免费观看| 色婷婷精品大视频在线蜜桃视频| 亚洲最大成人综合| 日韩欧美一区在线| 国产尤物一区二区在线| 国产精品素人视频| 欧美性猛交xxxxxxxx| 日本亚洲欧美天堂免费| 国产亚洲精品7777| 一本色道久久综合亚洲91| 亚洲gay无套男同| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 成人免费视频一区二区| 蜜芽一区二区三区| 亚洲成av人影院| 夜夜精品视频一区二区| 国产精品国产三级国产专播品爱网| 精品国产伦一区二区三区免费| 欧美日韩国产免费一区二区| 欧美亚洲日本国产| 在线观看免费一区| 欧美日韩中文字幕一区| 在线免费观看不卡av| 在线观看免费成人| 在线这里只有精品| 欧美午夜精品一区| 欧美美女bb生活片| 婷婷成人激情在线网| 日韩欧美一区二区久久婷婷| 99精品久久99久久久久| 韩国一区二区三区| 亚洲与欧洲av电影| 国产欧美1区2区3区| 欧美日韩国产首页| jlzzjlzz国产精品久久| 秋霞影院一区二区| 国产精品白丝在线| 2020国产精品自拍| 欧美精选午夜久久久乱码6080| 国产激情一区二区三区桃花岛亚洲| 亚洲国产成人高清精品| 国产精品久久久久久久久动漫| 日韩免费成人网| 欧美三级日韩三级国产三级| 国产福利精品一区二区| 久久电影网站中文字幕| 视频一区中文字幕| 亚洲精品免费电影| 中文字幕一区二区三区蜜月| 久久午夜国产精品| 精品久久久三级丝袜| 欧美精品亚洲一区二区在线播放| 一本到三区不卡视频| 福利91精品一区二区三区| 极品尤物av久久免费看| 中文字幕av资源一区| 久久久久久久久久看片| 中文字幕在线不卡国产视频| 亚洲大片一区二区三区| 九九国产精品视频| youjizz久久| 欧美日本韩国一区| 久久久久久一二三区| 亚洲免费在线电影| 九色综合狠狠综合久久| 91美女蜜桃在线| 日韩一本二本av| 国产精品国产三级国产有无不卡 | 中文字幕乱码久久午夜不卡| 亚洲激情图片qvod| 国产米奇在线777精品观看| 99国内精品久久| 欧美一级欧美三级在线观看| 国产精品久久久久久户外露出| 丝袜诱惑制服诱惑色一区在线观看 | 91成人国产精品| 欧美日韩国产高清一区二区三区 | 欧美日韩视频在线一区二区| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 色综合久久久久网| 欧美亚洲禁片免费| 日韩午夜在线播放| 精品理论电影在线| 国产日韩高清在线| 亚洲乱码中文字幕| 日本女优在线视频一区二区| 久久精品国产999大香线蕉| 国产福利一区二区| 91免费版pro下载短视频| 欧美日韩视频不卡| 欧美大胆人体bbbb| 国产精品久久午夜| 亚洲成在人线在线播放| 久久精品国产77777蜜臀| 国产精品1区二区.| 91成人免费电影| 精品国产乱码久久久久久久| 中文一区在线播放| 午夜精品久久久久久久蜜桃app| 精品一二三四在线| 色视频一区二区| 精品国产百合女同互慰| 亚洲欧洲综合另类| 精品一区二区在线观看| 一本到三区不卡视频| 日韩精品在线一区二区| 亚洲欧洲精品一区二区精品久久久 | 国产一区二区美女| 精品毛片乱码1区2区3区| 婷婷成人综合网| 欧美性生活一区| 亚洲一区二区在线观看视频| 99视频在线精品| 中文文精品字幕一区二区| 国产精品影视在线观看| 精品免费99久久| 国产做a爰片久久毛片| 欧美电视剧免费观看| 久久国产三级精品| 日韩午夜中文字幕| 青青草国产精品97视觉盛宴 | 精久久久久久久久久久| 欧美一卡2卡3卡4卡| 日本不卡免费在线视频| 欧美一区二区福利视频| 精品在线观看视频| 久久一日本道色综合| 国产麻豆成人传媒免费观看| 久久久久国产精品免费免费搜索| 69堂成人精品免费视频| 国产精品久久二区二区| 国产综合久久久久影院| 欧美一区二区三区四区高清| 怡红院av一区二区三区| 96av麻豆蜜桃一区二区| 欧美国产一区在线| 国产一区二区在线电影| 91精品国产综合久久久久久久久久| 综合网在线视频| 国产aⅴ精品一区二区三区色成熟| 欧美一区二区精品久久911| 亚洲国产精品久久不卡毛片| 色综合天天在线| 亚洲免费在线电影| 色综合色综合色综合| 综合网在线视频| 91丨九色丨黑人外教| 中文字幕一区二区不卡| 岛国精品一区二区| 中文字幕不卡三区| 成人精品在线视频观看| 亚洲欧洲性图库| 色综合久久久久| 亚洲综合一二区|