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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? fairgenericobjectpool.java

?? 爬蟲
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
    /**     * Create a new <tt>FairGenericObjectPool</tt> using the specified values.     * @param factory the (possibly <tt>null</tt>)PoolableObjectFactory to use to create, validate and destroy objects     * @param maxActive the maximum number of objects that can be borrowed from me at one time (see {@link #setMaxActive})     * @param whenExhaustedAction the action to take when the pool is exhausted (see {@link #setWhenExhaustedAction})     * @param maxWait the maximum amount of time to wait for an idle object when the pool is exhausted an and <i>whenExhaustedAction</i> is {@link #WHEN_EXHAUSTED_BLOCK} (otherwise ignored) (see {@link #setMaxWait})     * @param maxIdle the maximum number of idle objects in my pool (see {@link #setMaxIdle})     * @param minIdle the minimum number of idle objects in my pool (see {@link #setMinIdle})     * @param testOnBorrow whether or not to validate objects before they are returned by the {@link #borrowObject} method (see {@link #setTestOnBorrow})     * @param testOnReturn whether or not to validate objects after they are returned to the {@link #returnObject} method (see {@link #setTestOnReturn})     * @param timeBetweenEvictionRunsMillis the amount of time (in milliseconds) to sleep between examining idle objects for eviction (see {@link #setTimeBetweenEvictionRunsMillis})     * @param numTestsPerEvictionRun the number of idle objects to examine per run within the idle object eviction thread (if any) (see {@link #setNumTestsPerEvictionRun})     * @param minEvictableIdleTimeMillis the minimum number of milliseconds an object can sit idle in the pool before it is eligable for evcition (see {@link #setMinEvictableIdleTimeMillis})     * @param testWhileIdle whether or not to validate objects in the idle object eviction thread, if any (see {@link #setTestWhileIdle})     * @param softMinEvictableIdleTimeMillis the minimum number of milliseconds an object can sit idle in the pool before it is eligable for evcition with the extra condition that at least "minIdle" amount of object remain in the pool. (see {@link #setSoftMinEvictableIdleTimeMillis})     */    public FairGenericObjectPool(PoolableObjectFactory factory, int maxActive, byte whenExhaustedAction, long maxWait, int maxIdle, int minIdle, boolean testOnBorrow, boolean testOnReturn, long timeBetweenEvictionRunsMillis, int numTestsPerEvictionRun, long minEvictableIdleTimeMillis, boolean testWhileIdle, long softMinEvictableIdleTimeMillis) {        super(factory, maxActive, whenExhaustedAction, maxWait, maxIdle,                minIdle, testOnBorrow, testOnReturn,                timeBetweenEvictionRunsMillis, numTestsPerEvictionRun,                minEvictableIdleTimeMillis, testWhileIdle,                softMinEvictableIdleTimeMillis);        _borrowerQueue = Collections.synchronizedList(new LinkedList());    }        //-- ObjectPool methods ------------------------------------------    /**      *      * @see org.apache.commons.pool.ObjectPool#borrowObject()     */    public Object borrowObject() throws Exception {        assertOpen();        long starttime = System.currentTimeMillis();                                try {            synchronized(this) {                // use borrowerQueue                _borrowerQueue.add(Thread.currentThread());                                for(;;) {                    ObjectTimestampPair pair = null;                        // Only allow current thread to receive pool object if                    // thread is top of queue                     boolean eligible = _borrowerQueue.get(0)==Thread.currentThread();                    if(eligible) {                        // if there are any sleeping, just grab one of those                        try {                            pair = (ObjectTimestampPair)(_pool.removeFirst());                        } catch(NoSuchElementException e) {                            ; /* ignored */                        }                    }                        // otherwise                    if(null == pair) {                        // check if we can create one                        // (note we know that the num sleeping is 0, else we wouldn't be here)                        if(eligible && (_maxActive < 0 || _numActive < _maxActive)) {                            // allow new object to be created                        } else {                            // the pool is exhausted                            // or current thread is ineligible due to fairness                            switch(_whenExhaustedAction) {                                case WHEN_EXHAUSTED_GROW:                                    // allow new object to be created                                    break;                                case WHEN_EXHAUSTED_FAIL:                                    throw new NoSuchElementException("Pool exhausted");                                case WHEN_EXHAUSTED_BLOCK:                                    try {                                        if(_maxWait <= 0) {                                            wait();                                        } else {                                            // this code may be executed again after a notify then continue cycle                                            // so, need to calculate the amount of time to wait                                            final long elapsed = (System.currentTimeMillis() - starttime);                                            final long waitTime = _maxWait - elapsed;                                            if (waitTime > 0)                                            {                                                wait(waitTime);                                            }                                        }                                    } catch(InterruptedException e) {                                        // ignored                                    }                                    if(_maxWait > 0 && ((System.currentTimeMillis() - starttime) >= _maxWait)) {                                        throw new NoSuchElementException("Timeout waiting for idle object");                                    } else {                                        continue; // keep looping                                    }                                default:                                    throw new IllegalArgumentException("WhenExhaustedAction property " + _whenExhaustedAction + " not recognized.");                            }                        }                    }                    _numActive++;                        // create new object when needed                    boolean newlyCreated = false;                    if(null == pair) {                        try {                            Object obj = _factory.makeObject();                            pair = new ObjectTimestampPair(obj);                            newlyCreated = true;                            return pair.value;                        } finally {                            if (!newlyCreated) {                                // object cannot be created                                _numActive--;                                notifyAll();                            }                        }                    }                        // activate & validate the object                    try {                        _factory.activateObject(pair.value);                        if(_testOnBorrow && !_factory.validateObject(pair.value)) {                            throw new Exception("ValidateObject failed");                        }                        return pair.value;                    }                    catch (Throwable e) {                        // object cannot be activated or is invalid                        _numActive--;                        notifyAll();                        try {                            _factory.destroyObject(pair.value);                        }                        catch (Throwable e2) {                            // cannot destroy broken object                        }                        if(newlyCreated) {                            throw new NoSuchElementException("Could not create a validated object, cause: " + e.getMessage());                        }                        else {                            continue; // keep looping                        }                    }                }            }         } finally {            // remove thread from queue on any method exit            _borrowerQueue.remove(Thread.currentThread());        }    }    /** Waiting borrowers (threads in #borrowObject ) */    protected List _borrowerQueue;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲乱码国产乱码精品精98午夜 | 欧美色老头old∨ideo| 日韩女优视频免费观看| 亚洲天堂免费在线观看视频| 极品美女销魂一区二区三区免费| 欧美少妇bbb| 一区二区三区在线观看网站| 91无套直看片红桃| 亚洲欧美一区二区视频| 91在线视频官网| 国产精品久99| 一本久道久久综合中文字幕| 综合av第一页| 久久综合九色综合97婷婷 | 国产成人午夜视频| 国产色91在线| aaa亚洲精品| 国产精品久久久久久久久免费丝袜 | 色哟哟国产精品| 国产成人精品影院| 精品在线播放免费| 五月天激情综合| 日韩一区二区不卡| 国产综合一区二区| 国产精品天干天干在观线| 色综合久久综合网欧美综合网| 国产另类ts人妖一区二区| 亚洲丝袜自拍清纯另类| 久久午夜色播影院免费高清| 欧美成人一区二区三区在线观看| 成人午夜电影网站| 一二三区精品福利视频| 亚洲欧美怡红院| 国产精品毛片高清在线完整版 | 久久综合久久99| 日韩一级完整毛片| 日韩无一区二区| 欧美一二三区在线观看| 日韩欧美国产综合在线一区二区三区| 欧美日韩国产综合久久| 国产主播一区二区三区| 美女免费视频一区| 国产精品久久久爽爽爽麻豆色哟哟| 精品国产髙清在线看国产毛片| 97久久精品人人澡人人爽| 国产成人精品网址| 成人精品鲁一区一区二区| 亚洲精品日韩一| 亚洲精品乱码久久久久久| 亚洲精品综合在线| 亚洲国产综合在线| 欧美国产乱子伦| 日韩三级视频在线看| 日韩欧美电影在线| 国产欧美日韩三区| 欧美一级日韩一级| 91久久精品国产91性色tv| 国产伦精品一区二区三区在线观看| 亚洲一区二区三区四区在线观看| 久久只精品国产| 国产日本欧洲亚洲| 最新日韩av在线| 亚洲一线二线三线久久久| 日一区二区三区| 中文字幕一区av| 一区二区三区鲁丝不卡| 日韩中文字幕不卡| 国产一区999| 91免费看片在线观看| 精品视频一区 二区 三区| 日韩精品一区二区三区swag| 久久精品一区二区三区不卡牛牛| 国产精品美女久久久久久久久| 亚洲综合另类小说| 蜜桃视频一区二区| 成人avav在线| 欧美精品高清视频| 欧美日产国产精品| 精品剧情在线观看| 亚洲欧洲成人自拍| 日韩电影免费在线观看网站| 一区二区高清免费观看影视大全 | 最新中文字幕一区二区三区| 亚洲大尺度视频在线观看| 亚洲免费色视频| 亚洲欧美激情视频在线观看一区二区三区| 一区二区高清免费观看影视大全 | 91国产福利在线| 日韩精品一区二区三区视频在线观看 | 欧美日韩国产综合草草| 国产三级一区二区| 视频一区二区三区入口| 成人国产精品免费观看视频| 欧美日韩视频在线第一区| 中文字幕电影一区| 毛片基地黄久久久久久天堂| 99久免费精品视频在线观看| 欧美成人乱码一区二区三区| 亚洲人123区| 国产传媒日韩欧美成人| 欧美一区二区三区免费观看视频| 国产精品久久久久久久午夜片| 日本不卡一区二区三区高清视频| 99综合电影在线视频| 精品美女一区二区三区| 亚洲成在人线免费| 91色综合久久久久婷婷| 精品国产91亚洲一区二区三区婷婷| 一区二区成人在线| 97久久超碰精品国产| 国产色一区二区| 久久电影网电视剧免费观看| 国产精品66部| 欧美一级电影网站| 日韩精品一二三| 欧美亚洲综合网| 综合久久综合久久| 粉嫩av一区二区三区在线播放| a级精品国产片在线观看| 欧美精品一区二区三| 日韩高清不卡一区| 欧美撒尿777hd撒尿| 一区二区三区小说| 91欧美一区二区| 亚洲欧美日韩国产另类专区| 成人三级伦理片| 国产片一区二区三区| 国产主播一区二区| 精品国产乱码久久久久久蜜臀 | 欧美乱妇15p| 亚洲综合男人的天堂| 在线一区二区观看| 亚洲一区二区在线播放相泽| 91在线观看地址| 亚洲欧美日韩人成在线播放| 成人性生交大片免费看中文 | 天堂午夜影视日韩欧美一区二区| 色伊人久久综合中文字幕| 中文字幕制服丝袜成人av| 99vv1com这只有精品| 日韩美女精品在线| 色欧美片视频在线观看| 一级中文字幕一区二区| 欧美午夜精品一区| 性做久久久久久久免费看| 欧美日韩亚洲不卡| 老色鬼精品视频在线观看播放| 日韩一区二区电影| 国产成人在线视频网站| 国产精品盗摄一区二区三区| 99精品欧美一区二区蜜桃免费| 亚洲欧美日韩中文播放 | 久久精品夜夜夜夜久久| 国产成人av电影在线观看| 国产精品乱码妇女bbbb| 99re这里只有精品视频首页| 一区二区三区美女视频| 91精品国产高清一区二区三区| 久久er99热精品一区二区| 国产亚洲欧美中文| 99re成人精品视频| 天天综合天天综合色| 久久色.com| 色中色一区二区| 日韩影视精彩在线| 日本一区二区三区在线不卡| 99久久国产综合色|国产精品| 一区二区理论电影在线观看| 91精品国产全国免费观看| 麻豆91免费看| 国产精品久久免费看| 欧美日韩aaaaa| 国产成人aaa| 亚洲成年人影院| 久久精品一区四区| 欧美三级午夜理伦三级中视频| 老司机精品视频导航| 最近日韩中文字幕| 欧美一级免费大片| 成人国产亚洲欧美成人综合网| 亚洲国产欧美另类丝袜| 久久美女艺术照精彩视频福利播放| 日韩国产欧美在线播放| 欧美韩国日本不卡| 欧美人妇做爰xxxⅹ性高电影| 狠狠色综合色综合网络| 亚洲日本丝袜连裤袜办公室| 欧美一级夜夜爽| 99在线热播精品免费| 美女高潮久久久| 18涩涩午夜精品.www| 精品美女在线观看| 欧美日韩一区在线观看| 国产成人午夜电影网| 男人操女人的视频在线观看欧美| 7777精品伊人久久久大香线蕉的| 石原莉奈在线亚洲二区| 中文字幕人成不卡一区| 亚洲精品在线免费播放| 欧美视频在线观看一区|