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

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

?? trafficgenerator.java

?? 中間件開發詳細說明:清華大學J2EE教程講義(ppt)-Tsinghua University J2EE tutorial lectures (ppt) [上載源碼成為會員下載此源碼] [成為VIP會
?? JAVA
字號:
/* * Title:        GridSim Toolkit * Description:  GridSim (Grid Simulation) Toolkit for Modeling and Simulation *               of Parallel and Distributed Systems such as Clusters and Grids * Licence:      GPL - http://www.gnu.org/copyleft/gpl.html * * $Id: TrafficGenerator.java,v 1.4 2006/04/21 02:47:09 anthony Exp $ */package gridsim.util;import gridsim.*;import gridsim.net.*;import eduni.simjava.distributions.*;/** * A generator that tells how many packets sent and how big each packet is * for every time interval. This generator is used by  * {@link gridsim.net.Output} entity * to generate junk packets or some background traffic. * <p> * This class uses <code>eduni.simjava.distributions</code> package which is  * available from SimJava2 only. If you want to use other distribution * package, then you need to wrap each source file with either  * {@link eduni.simjava.distributions.DiscreteGenerator} or * {@link eduni.simjava.distributions.ContinuousGenerator} interface class. * * @see eduni.simjava.distributions.DiscreteGenerator * @see eduni.simjava.distributions.ContinuousGenerator * @since GridSim Toolkit 3.1 * @author Anthony Sulistio * @invariant $none */public class TrafficGenerator{    private int serviceType_;   // level of service for packets    private int pattern_;       // pattern of distributing packets    private final double ROUND_UP = 0.5;    // use discrete probabilistic distribution    private DiscreteGenerator discreteSize_;   // packet size    private DiscreteGenerator discreteTime_;   // inter-arrival time    private DiscreteGenerator discreteFreq_;   // frequency of created packets    // use continuous probabilistic distribution    private ContinuousGenerator conSize_;   // packet size    private ContinuousGenerator conTime_;   // inter-arrival time    private ContinuousGenerator conFreq_;   // frequency of created packets    /** Sends junk packets to all entities at one time,      * including resources and/or users     */    public static final int SEND_ALL = 1;    /** Sends junk packets to one of the entities at one time using      * a normal distribution from <tt>java.util.Random.nextInt(int)</tt>     */    public static final int SEND_ONE_ONLY = 2;        /**     * Creates a new background traffic generator.     * Each junk packet has a default size      * ({@link gridsim.net.Link#DEFAULT_MTU}), a default service type (0),     * and it will send to all resource entities and users (if applicable)      * ({@link #SEND_ALL}).     *     * @param freq      a generator for frequency or number of packets sent at      *                  one time     * @param timegen   a generator for inter-arrival sending time (second)     * @pre freq != null     * @pre timegen != null     * @post $none         */    public TrafficGenerator(DiscreteGenerator freq, DiscreteGenerator timegen)    {        discreteSize_ = null;        discreteTime_ = timegen;        discreteFreq_ = freq;        serviceType_ = 0;        pattern_ = SEND_ALL;        conSize_ = null;        conTime_ = null;        conFreq_ = null;    }    /**     * Creates a new background traffic generator.     * Each junk packet has a default size      * ({@link gridsim.net.Link#DEFAULT_MTU}), a default service type (0),     * and it will send to all resource entities and users (if applicable)      * ({@link #SEND_ALL}).     *     * @param freq      a generator for frequency or number of packets sent at      *                  one time     * @param timegen   a generator for inter-arrival sending time (second)     * @pre freq != null     * @pre timegen != null     * @post $none         */    public TrafficGenerator(ContinuousGenerator freq, ContinuousGenerator timegen)    {        discreteSize_ = null;        discreteTime_ = null;        discreteFreq_ = null;        serviceType_ = 0;        pattern_ = SEND_ALL;        conSize_ = null;        conTime_ = timegen;        conFreq_ = freq;    }    /**     * Creates a new background traffic generator.     * Each junk packet has a default size      * ({@link gridsim.net.Link#DEFAULT_MTU}), a default service type (0),     * and it will send to all resource entities and users (if applicable)      * ({@link #SEND_ALL}).     *     * @param freq      a generator for frequency or number of packets sent at      *                  one time     * @param timegen   a generator for inter-arrival sending time (second)     * @pre freq != null     * @pre timegen != null     * @post $none         */    public TrafficGenerator(DiscreteGenerator freq, ContinuousGenerator timegen)    {        discreteSize_ = null;        discreteTime_ = null;        discreteFreq_ = freq;        serviceType_ = 0;        pattern_ = SEND_ALL;        conSize_ = null;        conTime_ = timegen;        conFreq_ = null;    }        /**     * Creates a new background traffic generator.     * Each junk packet has a default size      * ({@link gridsim.net.Link#DEFAULT_MTU}), a default service type (0),     * and it will send to all resource entities and users (if applicable)      * ({@link #SEND_ALL}).     *     * @param freq      a generator for frequency or number of packets sent at      *                  one time     * @param timegen   a generator for inter-arrival sending time (second)     * @pre freq != null     * @pre timegen != null     * @post $none         */    public TrafficGenerator(ContinuousGenerator freq, DiscreteGenerator timegen)    {        discreteSize_ = null;        discreteTime_ = timegen;        discreteFreq_ = null;        serviceType_ = 0;        pattern_ = SEND_ALL;        conSize_ = null;        conTime_ = null;        conFreq_ = freq;    }    /**     * Sets the sending packet pattern if one or more entities are known.     * The pattern is one of the following:     * <ul>     *      <li> {@link #SEND_ALL}: sends to all resources and users (if known)     *      <li> {@link #SEND_ONE_ONLY}: sends to only one of them     * </ul>     *     * @param pattern        * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     * @pre $none     * @post $none     */    public boolean setPattern(int pattern)    {        if (pattern < SEND_ALL || pattern > SEND_ONE_ONLY) {            return false;        }        pattern_ = pattern;        return true;    }    /**     * Gets the sending packet pattern     * @return packet pattern     * @pre $none     * @post $none     */    public int getPattern() {        return pattern_;    }    /**     * Sets the size of each junk packet using a continuous distribution     * @param sizegen   a generator for each packet size     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     * @pre sizegen != null     * @post $none     */    public boolean setPacketSize(ContinuousGenerator sizegen)     {        if (sizegen == null) {            return false;        }                conSize_ = sizegen;        return true;    }    /**     * Sets the size of each junk packet using a discrete distribution     * @param sizegen   a generator for each packet size     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     * @pre sizegen != null     * @post $none     */    public boolean setPacketSize(DiscreteGenerator sizegen)     {        if (sizegen == null) {            return false;        }                discreteSize_ = sizegen;        return true;    }    /**     * Gets the next inter-arrival time between sending packets.     * For using continuous distribution, the value is rounded up to the     * nearest integer number.     *     * @return the next inter-arrival time     * @pre $none     * @post $none     */    public long getNextPacketTime()    {        long result = -1;        if (discreteTime_ != null) {            result = discreteTime_.sample();        }        else if (conTime_ != null)        {            double time = conTime_.sample();            result = (long) (time + ROUND_UP); // round up        }        return result;    }    /**     * Gets the next frequency or number of packets sent for each time.     * For using continuous distribution, the value is rounded up to the     * nearest integer number.     *     * @return frequence or number of packets sent for each time     * @pre $none     * @post $none     */    public long getNextPacketFreq()    {        long result = 0;        if (discreteFreq_ != null) {            result = discreteFreq_.sample();        }        else if (conFreq_ != null)        {            double time = conFreq_.sample();            result = (long) (time + ROUND_UP); // round up        }        return result;    }    /**     * Gets the next packet size. By default, the packet size is      * {@link gridsim.net.Link#DEFAULT_MTU}.     * For using continuous distribution, the value is rounded up to the     * nearest integer number.     *     * @return the next packet size     * @pre $none     * @post $none     */    public long getNextPacketSize()    {        long result = Link.DEFAULT_MTU;        if (discreteSize_ != null) {            result = discreteSize_.sample();        }        else if (conSize_ != null)        {            double size = conSize_.sample();            result = (long) (size + ROUND_UP);  // round up        }        return result;    }    /**     * Gets the service level of this packet. By default, the value is      * 0 (zero).     * @return the service level of this packet     * @pre $none     * @post $none     */    public int getServiceType() {        return serviceType_;    }    /**     * Sets the service level of this packet.     * @param type  the service level of this packet     * @return <tt>true</tt> if successful, <tt>false</tt> otherwise     * @pre type >= 0     * @post $none     */    public boolean setServiceType(int type)    {        if (type < 0) {            return false;        }        serviceType_ = type;        return true;    }} // end class

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
www国产成人免费观看视频 深夜成人网| 亚洲成人免费电影| 国产精品亚洲专一区二区三区 | 91黄色在线观看| 亚洲欧美日韩人成在线播放| 91久久精品日日躁夜夜躁欧美| 亚洲人精品午夜| 欧美在线短视频| 亚洲v中文字幕| 欧美精品乱码久久久久久| 亚洲成人在线观看视频| 欧美日本在线观看| 免费人成网站在线观看欧美高清| 亚洲视频一区在线观看| 成人性生交大片免费看视频在线 | 亚洲视频在线一区二区| 国产乱淫av一区二区三区| 久久老女人爱爱| 韩国精品主播一区二区在线观看 | 亚洲午夜私人影院| 欧美午夜一区二区三区免费大片| 天堂蜜桃一区二区三区| 欧美麻豆精品久久久久久| 婷婷开心激情综合| 欧美不卡一二三| 高潮精品一区videoshd| 亚洲天堂网中文字| 欧美日韩一区二区三区视频 | 国产jizzjizz一区二区| 亚洲欧洲www| 欧美狂野另类xxxxoooo| 九九**精品视频免费播放| 久久九九99视频| 色婷婷久久综合| 日本不卡1234视频| 国产性色一区二区| 91国偷自产一区二区三区观看| 婷婷激情综合网| 日韩一级黄色大片| 97精品电影院| 免费成人小视频| |精品福利一区二区三区| 91精品国产综合久久久久久久| 国产精品中文字幕欧美| 久久男人中文字幕资源站| 91在线播放网址| 蜜臀av性久久久久蜜臀aⅴ四虎 | 99在线热播精品免费| 性欧美疯狂xxxxbbbb| 久久久久国色av免费看影院| 日本高清成人免费播放| 精彩视频一区二区三区| 亚洲一区精品在线| 国产偷国产偷精品高清尤物| 欧美在线制服丝袜| 国产精品乡下勾搭老头1| 亚洲成a人片在线不卡一二三区 | 香港成人在线视频| 国产精品免费视频一区| 欧美成人性福生活免费看| 日本道色综合久久| 成人激情动漫在线观看| 亚洲福利视频一区| 欧美激情综合五月色丁香| 在线观看国产日韩| 高清不卡一区二区| 色综合天天综合| 久久精品国产久精国产| 亚洲色图制服丝袜| 欧美精品一区二区三区一线天视频 | 亚洲制服丝袜av| 久久免费午夜影院| 欧美一级片免费看| 欧美性一级生活| av一区二区不卡| 国产传媒一区在线| 精品无人码麻豆乱码1区2区 | 在线视频你懂得一区二区三区| 成人一区二区三区视频在线观看| 日韩精品视频网| 午夜精品爽啪视频| 亚洲国产人成综合网站| 亚洲欧美一区二区在线观看| 欧美激情综合五月色丁香| 久久久久综合网| 亚洲精品一区二区三区福利| 欧美一区二区三区四区久久| 欧美精品色综合| 9191久久久久久久久久久| 欧美日韩情趣电影| 欧美午夜不卡在线观看免费| 色伊人久久综合中文字幕| 99视频超级精品| 99re这里只有精品首页| 成人国产亚洲欧美成人综合网| 成人性生交大片免费看在线播放 | 制服丝袜在线91| 5月丁香婷婷综合| 欧美一级高清大全免费观看| 欧美美女直播网站| 制服丝袜成人动漫| 精品国产一区二区三区av性色| 日韩免费福利电影在线观看| 日韩精品中午字幕| 久久美女艺术照精彩视频福利播放| 亚洲精品在线观看视频| 国产亚洲成av人在线观看导航| 欧美国产日产图区| 最近日韩中文字幕| 亚洲一区二区欧美日韩| 日韩专区一卡二卡| 精品综合久久久久久8888| 久久99日本精品| 成人免费看黄yyy456| 91网站最新地址| 欧美日本乱大交xxxxx| 91精品国产综合久久精品麻豆 | 亚洲sss视频在线视频| 日韩福利视频网| 国产精品一线二线三线| zzijzzij亚洲日本少妇熟睡| 在线日韩一区二区| 欧美成人精精品一区二区频| 欧美国产精品专区| 亚洲最新在线观看| 欧美丝袜自拍制服另类| 欧美久久久久久久久中文字幕| 欧美成人精品1314www| 国产精品黄色在线观看| 日韩和欧美一区二区| 国产精品一区二区男女羞羞无遮挡| fc2成人免费人成在线观看播放| 欧美区一区二区三区| 中文字幕免费一区| 日日欢夜夜爽一区| 成人h动漫精品一区二| 欧美日韩国产精选| 亚洲国产精华液网站w| 五月天丁香久久| 成人av在线播放网站| 宅男在线国产精品| 亚洲欧美成aⅴ人在线观看| 秋霞电影一区二区| 91黄色免费观看| 亚洲国产精品ⅴa在线观看| 偷偷要91色婷婷| 91免费看`日韩一区二区| 精品乱码亚洲一区二区不卡| 一片黄亚洲嫩模| 风间由美中文字幕在线看视频国产欧美 | 亚洲va天堂va国产va久| 国产精品系列在线观看| 欧美另类变人与禽xxxxx| 国产精品久久久久9999吃药| 久久国产精品露脸对白| 色嗨嗨av一区二区三区| 久久久午夜电影| 日韩精品久久久久久| 成人一道本在线| 精品区一区二区| 亚瑟在线精品视频| 成人aa视频在线观看| 欧美日韩一区二区在线观看视频 | 老司机一区二区| 欧美人妖巨大在线| 伊人夜夜躁av伊人久久| 国产成人精品综合在线观看| 日韩欧美一级精品久久| 亚洲女女做受ⅹxx高潮| 麻豆精品一区二区| 欧美一区二区三区婷婷月色| 亚洲最大色网站| 91啪在线观看| 久久精品亚洲一区二区三区浴池| 美国十次了思思久久精品导航| 欧美无人高清视频在线观看| 亚洲日本电影在线| 91视频一区二区三区| 国产精品亲子伦对白| 成人免费观看av| 中文字幕亚洲成人| 99精品桃花视频在线观看| 欧美激情在线免费观看| 成人午夜大片免费观看| 国产精品激情偷乱一区二区∴| 成人在线视频首页| 亚洲欧洲av一区二区三区久久| 国产成人精品三级麻豆| 久久这里都是精品| 视频一区视频二区中文| 欧美日韩亚洲综合在线| 日本一区二区视频在线观看| 国产亚洲欧美激情| 91亚洲男人天堂| 一区二区三区在线观看欧美| 欧美精品乱码久久久久久| 欧美精品久久久久久久久老牛影院| 视频一区二区三区在线| 欧美一级高清大全免费观看| 国产成人啪免费观看软件|