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

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

?? garbagecollectionservice.java

?? 一個java方面的消息訂閱發送的源碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/**
 * Redistribution and use of this software and associated documentation
 * ("Software"), with or without modification, are permitted provided
 * that the following conditions are met:
 *
 * 1. Redistributions of source code must retain copyright
 *    statements and notices.  Redistributions must also contain a
 *    copy of this document.
 *
 * 2. Redistributions in binary form must reproduce the
 *    above copyright notice, this list of conditions and the
 *    following disclaimer in the documentation and/or other
 *    materials provided with the distribution.
 *
 * 3. The name "Exolab" must not be used to endorse or promote
 *    products derived from this Software without prior written
 *    permission of Exoffice Technologies.  For written permission,
 *    please contact info@exolab.org.
 *
 * 4. Products derived from this Software may not be called "Exolab"
 *    nor may "Exolab" appear in their names without prior written
 *    permission of Exoffice Technologies. Exolab is a registered
 *    trademark of Exoffice Technologies.
 *
 * 5. Due credit should be given to the Exolab Project
 *    (http://www.exolab.org/).
 *
 * THIS SOFTWARE IS PROVIDED BY EXOFFICE TECHNOLOGIES AND CONTRIBUTORS
 * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
 * EXOFFICE TECHNOLOGIES OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * Copyright 2001-2004 (C) Exoffice Technologies Inc. All Rights Reserved.
 *
 * $Id: GarbageCollectionService.java,v 1.1 2004/11/26 01:50:42 tanderson Exp $
 */
package org.exolab.jms.gc;

import java.util.LinkedList;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.exolab.jms.config.Configuration;
import org.exolab.jms.config.ConfigurationManager;
import org.exolab.jms.config.GarbageCollectionConfiguration;
import org.exolab.jms.service.BasicService;
import org.exolab.jms.service.ServiceException;
import org.exolab.jms.service.ServiceState;
import org.exolab.jms.events.BasicEventManager;
import org.exolab.jms.events.Event;
import org.exolab.jms.events.EventHandler;
import org.exolab.jms.events.IllegalEventDefinedException;


/**
 * The garbage collection service is responsible for managing all transient
 * garbage collection for OpenJMS, which includes messages, destinations,
 * endpoints etc. It does not deal with persistent data, which is handled
 * through the database service. Other services or managers can register
 * themselves with GarbageCollectionService if they implement the
 * {@link GarbageCollectable} interface.
 * <p>
 * Gargabe collection will be initiated when the amount of free memory falls
 * below a low water mark, which is calculated as a percentage of total memory.
 * By default garbage collection will run when free memory falls below 20%
 * of total memory, this can be changed through the configuration file.
 * <p>
 * The service will check the memory usage every 30 seconds by default. but
 * this can also be modified through the configuration file.
 * <p>
 * In addition the garbage collection service can also be configured to
 * execute at regular intervals regardless the amount of residual free memory.
 * This option can be employed to ease the burden of performing wholesale
 * garbage collection when memory falls below the low water mark threshold. The
 * default value for this is 300 seconds. Setting this value to 0 will disable
 * this capability.
 * <p>
 * This service makes use of the {@link BasicEventManager} to register events 
 * for garbage collection.
 *
 * @version     $Revision: 1.1 $ $Date: 2004/11/26 01:50:42 $
 * @author      <a href="mailto:jima@intalio.com">Jim Alateras</a>
 */
public class GarbageCollectionService
    extends BasicService
    implements EventHandler {

    /**
     * The name of the service
     */
    private final static String GC_SERVICE_NAME = "GCCollectionService";

    /**
     * This is the value of the trnasient garbage collection event that
     * is used to register with the {@link BasicEventManager}. When this event
     * is received the memory utilization is checked to determine whether
     * we need to perform some garbage collection.
     */
    private final static int CHECK_FREE_MEMORY_EVENT = 1;

    /**
     * This event is used to unconditionally trigger garbage collection.
     */
    private final static int GARBAGE_COLLECT_EVENT = 2;

    /**
     * Maintains a singleton instance of the gc service
     */
    private static GarbageCollectionService _instance = null;

    /**
     * Used to synchronize the creation of the transaction manager
     */
    private static final Object _creator = new Object();

    /**
     * The default low water threshold value before GC is initiated.
     * This is specified as a percentage with valid values ranging from
     * 10-50.
     */
    private int _gcLowWaterThreshold = 20;

    /**
     * The default interval, in seconds, that memory is checked for
     * the low water threshold. The default is 30 seconds.
     */
    private int _memoryCheckInterval = 30 * 1000;

    /**
     * The default interval, in seconds, between successive executions
     * of the garbage collector. This will execute regardless the amount
     * of free memory left in the VM.
     */
    private int _gcInterval = 300 * 1000;

    /**
     * This is the priority of that the GC thread uses to collect garbage.
     * Changing it effects how aggressive GC is performed. The default value
     * is 5.
     */
    private int _gcThreadPriority = 5;

    /**
     * This is used to serialize access to the _collectingGarbage flag
     */
    private final Object _gcGuard = new Object();

    /**
     * This flag indicates whether garabage collection is in progress
     */
    private boolean _collectingGarbage = false;

    /**
     * Maintains a list of all GarbageCollectable instances
     */
    private LinkedList _gcList = new LinkedList();

    /**
     * The logger
     */
    private static final Log _log =
        LogFactory.getLog(GarbageCollectionService.class);


    /**
     * Return the singleton instance of the GarbageCollectionService
     *
     * @return GarbageCollectionService
     * @throws GarbageCollectionServiceException
     */
    public static GarbageCollectionService instance()
        throws GarbageCollectionServiceException {
        if (_instance == null) {
            synchronized (_creator) {
                // we need to check again if multiple threads
                // have blocked on the creation of the singleton
                if (_instance == null) {
                    _instance = new GarbageCollectionService();
                }
            }
        }

        return _instance;
    }

    /**
     * Create an instance of a garbage collection service. It uses the
     * configuration manager to extract the service parameters.
     *
     * @throws GarbageCollectionServiceException
     */
    GarbageCollectionService() {
        super(GC_SERVICE_NAME);

        // access the configuration file.
        Configuration config = ConfigurationManager.getConfig();
        GarbageCollectionConfiguration gc_config =
            config.getGarbageCollectionConfiguration();

        // read the value and ensure that it is within
        // the specified limits
        int low = gc_config.getLowWaterThreshold();
        if (low < 10) {
            low = 10;
        }

        if (low > 50) {
            low = 50;
        }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人a级片| 精品一区二区久久久| 欧美成人一区二区三区片免费| 色综合色综合色综合| 色哟哟精品一区| 国产mv日韩mv欧美| 成人美女在线视频| av成人免费在线观看| 99视频精品在线| 91玉足脚交白嫩脚丫在线播放| 成人avav影音| 91在线播放网址| 欧美四级电影在线观看| 在线观看不卡视频| 欧美日韩精品三区| 欧美大片国产精品| 久久久精品tv| 国产精品久久午夜| 亚洲一区二区在线视频| 日韩va欧美va亚洲va久久| 轻轻草成人在线| 国产精品一区二区在线播放| www.亚洲免费av| 欧美三级日本三级少妇99| 欧美一区二区观看视频| 久久精品综合网| 亚洲精品ww久久久久久p站| 婷婷久久综合九色综合绿巨人| 日本va欧美va精品发布| 国产盗摄一区二区三区| 91丨九色丨国产丨porny| 欧美日韩精品一区视频| 26uuu久久天堂性欧美| 亚洲女性喷水在线观看一区| 蜜臀va亚洲va欧美va天堂| 国产在线精品视频| 在线看国产日韩| 久久久久久久国产精品影院| 亚洲人亚洲人成电影网站色| 日本强好片久久久久久aaa| 波多野结衣一区二区三区 | 国产精品一区不卡| 色婷婷久久综合| 欧美精品一区二区三区一线天视频| 成人免费在线观看入口| 麻豆国产欧美日韩综合精品二区| 成人精品免费看| 日韩免费视频线观看| 亚洲欧美韩国综合色| 国产精品亚洲人在线观看| 欧美老肥妇做.爰bbww视频| 国产精品青草综合久久久久99| 日韩精品乱码免费| 色狠狠色狠狠综合| 欧美激情一区二区三区蜜桃视频| 秋霞午夜鲁丝一区二区老狼| 91激情五月电影| 国产农村妇女毛片精品久久麻豆| 午夜欧美视频在线观看| 色系网站成人免费| 日本一区二区三区高清不卡| 久久成人免费电影| 欧美日本精品一区二区三区| 一区二区三区产品免费精品久久75| 国产精品12区| 精品国产污网站| 男女男精品视频| 欧美男男青年gay1069videost| 亚洲视频一二三| 99免费精品在线观看| 久久久久国产免费免费| 另类小说综合欧美亚洲| 日韩午夜激情视频| 日韩精品一二三四| 欧美老肥妇做.爰bbww| 亚洲午夜私人影院| 欧洲日韩一区二区三区| 樱花影视一区二区| 在线观看中文字幕不卡| 亚洲精品成人悠悠色影视| 97久久久精品综合88久久| 亚洲欧美综合另类在线卡通| 成人av在线资源网| 亚洲啪啪综合av一区二区三区| 丁香六月久久综合狠狠色| 欧美激情艳妇裸体舞| 成人av在线一区二区| 亚洲视频一二区| 欧美午夜一区二区三区| 日韩成人一级大片| 欧美v国产在线一区二区三区| 久久疯狂做爰流白浆xx| 国产校园另类小说区| 成人av影院在线| 一区二区三区毛片| 欧美一区日韩一区| 国产乱国产乱300精品| 日本一区二区视频在线| 91亚洲精华国产精华精华液| 亚洲欧美aⅴ...| 欧美一区二区三区免费大片| 国产麻豆精品视频| 亚洲精品视频观看| 欧美成人欧美edvon| 成人午夜私人影院| 一区二区高清免费观看影视大全| 欧美三级视频在线观看| 国产在线不卡一区| 亚洲人成网站影音先锋播放| 欧美日韩精品欧美日韩精品一| 捆绑调教美女网站视频一区| 亚洲国产精品激情在线观看| 欧美性猛片xxxx免费看久爱| 久久精品国产99国产精品| 1区2区3区欧美| 日韩午夜激情免费电影| caoporm超碰国产精品| 亚洲不卡在线观看| 国产精品网站在线播放| 日韩一区二区在线观看视频播放| 风间由美一区二区av101| 偷窥国产亚洲免费视频| 国产欧美日韩中文久久| 91精品国产入口在线| 色综合久久久网| 国产一区二区三区四区五区入口 | 国产情人综合久久777777| 91激情在线视频| 成人午夜短视频| 日韩综合一区二区| 中文字幕欧美一区| 久久久精品免费观看| 777久久久精品| 欧美曰成人黄网| 国产成人综合亚洲网站| 日产欧产美韩系列久久99| 亚洲视频香蕉人妖| 中文字幕制服丝袜一区二区三区| 欧美一级爆毛片| 欧美日韩日日骚| 色美美综合视频| 北岛玲一区二区三区四区| 国产精品一卡二卡| 国产在线播精品第三| 另类调教123区 | 国产欧美一区二区精品忘忧草| 欧美日韩在线亚洲一区蜜芽| 91美女片黄在线| 99re热视频精品| 99热99精品| 91在线免费看| 91蜜桃在线免费视频| 不卡欧美aaaaa| 亚洲成人7777| 一区二区三区日韩精品视频| 国产精品丝袜在线| 亚洲国产经典视频| 久久久www成人免费毛片麻豆| 欧美成人免费网站| 久久综合久久综合久久综合| 精品久久久久av影院| 久久综合给合久久狠狠狠97色69| 欧美xxxxxxxx| 久久免费偷拍视频| 欧美激情综合在线| 亚洲三级在线看| 亚洲一区二区四区蜜桃| 亚洲成av人片一区二区三区| 舔着乳尖日韩一区| 麻豆一区二区三| 国模冰冰炮一区二区| 国产精品99久久久久久似苏梦涵| 国产裸体歌舞团一区二区| 不卡影院免费观看| 91久久人澡人人添人人爽欧美| 欧美三级在线看| 精品蜜桃在线看| 亚洲柠檬福利资源导航| 丝袜美腿亚洲一区| 国产成人午夜99999| 91丨porny丨户外露出| 欧美日韩国产综合久久| 日韩一区二区电影| 欧美高清在线一区| 亚洲丰满少妇videoshd| 国产一区二区三区电影在线观看| 成人免费高清视频| 在线成人免费观看| 久久久久久97三级| 一区二区三区在线高清| 精品一区二区在线视频| 99久久99久久综合| 欧美电视剧在线观看完整版| 欧美激情艳妇裸体舞| 日韩激情av在线| 成人性生交大片免费看中文| 337p亚洲精品色噜噜狠狠| 国产精品久久久久久久久晋中| 日韩精品一二三四| 99久久久国产精品|