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

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

?? quartzschedulerresources.java

?? Java中非常實用流控制工具
?? JAVA
字號:

/* 
 * Copyright 2004-2005 OpenSymphony 
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 
 * use this file except in compliance with the License. You may obtain a copy 
 * of the License at 
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0 
 *   
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 
 * License for the specific language governing permissions and limitations 
 * under the License.
 * 
 */

/*
 * Previously Copyright (c) 2001-2004 James House
 */
package org.quartz.core;

import java.util.ArrayList;
import java.util.List;

import org.quartz.spi.JobStore;
import org.quartz.spi.SchedulerPlugin;
import org.quartz.spi.ThreadPool;

/**
 * <p>
 * Contains all of the resources (<code>JobStore</code>,<code>ThreadPool</code>,
 * etc.) necessary to create a <code>{@link QuartzScheduler}</code> instance.
 * </p>
 * 
 * @see QuartzScheduler
 * 
 * @author James House
 */
public class QuartzSchedulerResources {

    /*
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * 
     * Data members.
     * 
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     */

    public static final String CREATE_REGISTRY_NEVER = "never";

    public static final String CREATE_REGISTRY_ALWAYS = "always";

    public static final String CREATE_REGISTRY_AS_NEEDED = "as_needed";

    private String name;

    private String instanceId;

    private String threadName;
    
    private String rmiRegistryHost = null;

    private int rmiRegistryPort = 1099;

    private int rmiServerPort = -1;

    private String rmiCreateRegistryStrategy = CREATE_REGISTRY_NEVER;

    private ThreadPool threadPool;

    private JobStore jobStore;

    private JobRunShellFactory jobRunShellFactory;

    private ArrayList schedulerPlugins = new ArrayList(10);
    
    private boolean makeSchedulerThreadDaemon = false;

    private boolean threadsInheritInitializersClassLoadContext = false;

    private String rmiBindName;
    
    private boolean jmxExport;
    
    private String jmxObjectName;
    
    /*
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * 
     * Constructors.
     * 
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     */

    /**
     * <p>
     * Create an instance with no properties initialized.
     * </p>
     */
    public QuartzSchedulerResources() {
        // do nothing...
    }

    /*
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * 
     * Interface.
     * 
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     */

    /**
     * <p>
     * Get the name for the <code>{@link QuartzScheduler}</code>.
     * </p>
     */
    public String getName() {
        return name;
    }

    /**
     * <p>
     * Set the name for the <code>{@link QuartzScheduler}</code>.
     * </p>
     * 
     * @exception IllegalArgumentException
     *              if name is null or empty.
     */
    public void setName(String name) {
        if (name == null || name.trim().length() == 0) {
            throw new IllegalArgumentException(
                    "Scheduler name cannot be empty.");
        }

        this.name = name;
        
        if (threadName == null) {
            // thread name not already set, use default thread name
            setThreadName(name + "_QuartzSchedulerThread");
        }        
    }

    /**
     * <p>
     * Get the instance Id for the <code>{@link QuartzScheduler}</code>.
     * </p>
     */
    public String getInstanceId() {
        return instanceId;
    }

    /**
     * <p>
     * Set the name for the <code>{@link QuartzScheduler}</code>.
     * </p>
     * 
     * @exception IllegalArgumentException
     *              if name is null or empty.
     */
    public void setInstanceId(String instanceId) {
        if (instanceId == null || instanceId.trim().length() == 0) {
            throw new IllegalArgumentException(
                    "Scheduler instanceId cannot be empty.");
        }

        this.instanceId = instanceId;
    }

    public static String getUniqueIdentifier(String schedName,
            String schedInstId) {
        return schedName + "_$_" + schedInstId;
    }

    public String getUniqueIdentifier() {
        return getUniqueIdentifier(name, instanceId);
    }

    /**
     * <p>
     * Get the host name of the RMI Registry that the scheduler should export
     * itself to.
     * </p>
     */
    public String getRMIRegistryHost() {
        return rmiRegistryHost;
    }

    /**
     * <p>
     * Set the host name of the RMI Registry that the scheduler should export
     * itself to.
     * </p>
     */
    public void setRMIRegistryHost(String hostName) {
        this.rmiRegistryHost = hostName;
    }

    /**
     * <p>
     * Get the port number of the RMI Registry that the scheduler should export
     * itself to.
     * </p>
     */
    public int getRMIRegistryPort() {
        return rmiRegistryPort;
    }

    /**
     * <p>
     * Set the port number of the RMI Registry that the scheduler should export
     * itself to.
     * </p>
     */
    public void setRMIRegistryPort(int port) {
        this.rmiRegistryPort = port;
    }


    /**
     * <p>
     * Get the port number the scheduler server will be bound to.
     * </p>
     */
    public int getRMIServerPort() {
        return rmiServerPort;
    }

    /**
     * <p>
     * Set the port number the scheduler server will be bound to.
     * </p>
     */
    public void setRMIServerPort(int port) {
        this.rmiServerPort = port;
    }
    
    /**
     * <p>
     * Get the setting of whether or not Quartz should create an RMI Registry,
     * and if so, how.
     * </p>
     */
    public String getRMICreateRegistryStrategy() {
        return rmiCreateRegistryStrategy;
    }

    /**
     * <p>
     * Get the name for the <code>{@link QuartzSchedulerThread}</code>.
     * </p>
     */
    public String getThreadName() {
        return threadName;
    }

    /**
     * <p>
     * Set the name for the <code>{@link QuartzSchedulerThread}</code>.
     * </p>
     * 
     * @exception IllegalArgumentException
     *              if name is null or empty.
     */
    public void setThreadName(String threadName) {
        if (threadName == null || threadName.trim().length() == 0) {
            throw new IllegalArgumentException(
                    "Scheduler thread name cannot be empty.");
        }

        this.threadName = threadName;
    }    
    
    /**
     * <p>
     * Set whether or not Quartz should create an RMI Registry, and if so, how.
     * </p>
     * 
     * @see #CREATE_REGISTRY_ALWAYS
     * @see #CREATE_REGISTRY_AS_NEEDED
     * @see #CREATE_REGISTRY_NEVER
     */
    public void setRMICreateRegistryStrategy(String rmiCreateRegistryStrategy) {
        if (rmiCreateRegistryStrategy == null
                || rmiCreateRegistryStrategy.trim().length() == 0) {
            rmiCreateRegistryStrategy = CREATE_REGISTRY_NEVER;
        } else if (rmiCreateRegistryStrategy.equalsIgnoreCase("true")) {
            rmiCreateRegistryStrategy = CREATE_REGISTRY_AS_NEEDED;
        } else if (rmiCreateRegistryStrategy.equalsIgnoreCase("false")) {
            rmiCreateRegistryStrategy = CREATE_REGISTRY_NEVER;
        } else if (rmiCreateRegistryStrategy.equalsIgnoreCase(CREATE_REGISTRY_ALWAYS)) {
            rmiCreateRegistryStrategy = CREATE_REGISTRY_ALWAYS;
        } else if (rmiCreateRegistryStrategy.equalsIgnoreCase(CREATE_REGISTRY_AS_NEEDED)) {
            rmiCreateRegistryStrategy = CREATE_REGISTRY_AS_NEEDED;
        } else if (rmiCreateRegistryStrategy.equalsIgnoreCase(CREATE_REGISTRY_NEVER)) {
            rmiCreateRegistryStrategy = CREATE_REGISTRY_NEVER;
        } else {
            throw new IllegalArgumentException(
                    "Faild to set RMICreateRegistryStrategy - strategy unknown: '"
                            + rmiCreateRegistryStrategy + "'");
        }

        this.rmiCreateRegistryStrategy = rmiCreateRegistryStrategy;
    }

    /**
     * <p>
     * Get the <code>{@link ThreadPool}</code> for the <code>{@link QuartzScheduler}</code>
     * to use.
     * </p>
     */
    public ThreadPool getThreadPool() {
        return threadPool;
    }

    /**
     * <p>
     * Set the <code>{@link ThreadPool}</code> for the <code>{@link QuartzScheduler}</code>
     * to use.
     * </p>
     * 
     * @exception IllegalArgumentException
     *              if threadPool is null.
     */
    public void setThreadPool(ThreadPool threadPool) {
        if (threadPool == null) {
            throw new IllegalArgumentException("ThreadPool cannot be null.");
        }

        this.threadPool = threadPool;
    }

    /**
     * <p>
     * Get the <code>{@link JobStore}</code> for the <code>{@link QuartzScheduler}</code>
     * to use.
     * </p>
     */
    public JobStore getJobStore() {
        return jobStore;
    }

    /**
     * <p>
     * Set the <code>{@link JobStore}</code> for the <code>{@link QuartzScheduler}</code>
     * to use.
     * </p>
     * 
     * @exception IllegalArgumentException
     *              if jobStore is null.
     */
    public void setJobStore(JobStore jobStore) {
        if (jobStore == null) {
            throw new IllegalArgumentException("JobStore cannot be null.");
        }

        this.jobStore = jobStore;
    }

    /**
     * <p>
     * Get the <code>{@link JobRunShellFactory}</code> for the <code>{@link QuartzScheduler}</code>
     * to use.
     * </p>
     */
    public JobRunShellFactory getJobRunShellFactory() {
        return jobRunShellFactory;
    }

    /**
     * <p>
     * Set the <code>{@link JobRunShellFactory}</code> for the <code>{@link QuartzScheduler}</code>
     * to use.
     * </p>
     * 
     * @exception IllegalArgumentException
     *              if jobRunShellFactory is null.
     */
    public void setJobRunShellFactory(JobRunShellFactory jobRunShellFactory) {
        if (jobRunShellFactory == null) {
            throw new IllegalArgumentException(
                    "JobRunShellFactory cannot be null.");
        }

        this.jobRunShellFactory = jobRunShellFactory;
    }

    /**
     * <p>
     * Add the given <code>{@link org.quartz.spi.SchedulerPlugin}</code> for the 
     * <code>{@link QuartzScheduler}</code> to use. This method expects the plugin's
     * "initialize" method to be invoked externally (either before or after
     * this method is called).
     * </p>
     */
    public void addSchedulerPlugin(SchedulerPlugin plugin) {
        schedulerPlugins.add(plugin);
    }
    
    /**
     * <p>
     * Get the <code>List</code> of all 
     * <code>{@link org.quartz.spi.SchedulerPlugin}</code>s for the 
     * <code>{@link QuartzScheduler}</code> to use.
     * </p>
     */
    public List getSchedulerPlugins() {
        return schedulerPlugins;
    }

    /**
     * Get whether to mark the Quartz scheduling thread as daemon.
     * 
     * @see Thread#setDaemon(boolean)
     */
    public boolean getMakeSchedulerThreadDaemon() {
        return makeSchedulerThreadDaemon;
    }

    /**
     * Set whether to mark the Quartz scheduling thread as daemon.
     * 
     * @see Thread#setDaemon(boolean)
     */
    public void setMakeSchedulerThreadDaemon(boolean makeSchedulerThreadDaemon) {
        this.makeSchedulerThreadDaemon = makeSchedulerThreadDaemon;
    }

    /**
     * Get whether to set the class load context of spawned threads to that
     * of the initializing thread.
     */
    public boolean isThreadsInheritInitializersClassLoadContext() {
		return threadsInheritInitializersClassLoadContext;
	}

    /**
     * Set whether to set the class load context of spawned threads to that
     * of the initializing thread.
     */
	public void setThreadsInheritInitializersClassLoadContext(
			boolean threadsInheritInitializersClassLoadContext) {
		this.threadsInheritInitializersClassLoadContext = threadsInheritInitializersClassLoadContext;
	}

	/**
     * Get the name under which to bind the QuartzScheduler in RMI.  Will 
     * return the value of the uniqueIdentifier property if explict RMI bind 
     * name was never set.
     * 
     * @see #getUniqueIdentifier()
     */
    public String getRMIBindName() {
        return (rmiBindName == null) ? getUniqueIdentifier() : rmiBindName;
    }

    /**
     * Set the name under which to bind the QuartzScheduler in RMI.  If unset, 
     * defaults to the value of the uniqueIdentifier property.
     * 
     * @see #getUniqueIdentifier()
     */
    public void setRMIBindName(String rmiBindName) {
        this.rmiBindName = rmiBindName;
    }

    /**
     * Get whether the QuartzScheduler should be registered with the local 
     * MBeanServer.
     */
    public boolean getJMXExport() {
        return jmxExport;
    }

    /**
     * Set whether the QuartzScheduler should be registered with the local 
     * MBeanServer.
     */
    public void setJMXExport(boolean jmxExport) {
        this.jmxExport = jmxExport;
    }

    /**
     * Get the name under which the QuartzScheduler should be registered with 
     * the local MBeanServer.  If unset, defaults to the value calculated by 
     * <code>generateJMXObjectName<code>.
     * 
     * @see #generateJMXObjectName(String, String)
     */
    public String getJMXObjectName() {
        return (jmxObjectName == null) ? generateJMXObjectName(name, instanceId) : jmxObjectName;
    }

    /**
     * Set the name under which the QuartzScheduler should be registered with 
     * the local MBeanServer.  If unset, defaults to the value calculated by 
     * <code>generateJMXObjectName<code>.
     * 
     * @see #generateJMXObjectName(String, String)
     */
    public void setJMXObjectName(String jmxObjectName) {
        this.jmxObjectName = jmxObjectName;
    }
    
    /**
     * Create the name under which this scheduler should be registered in JMX.
     * <p>
     * The name is composed as: 
     *  quartz:type=QuartzScheduler,name=<i>[schedName]</i>,instance=<i>[schedInstId]</i>
     * </p>
     */
    public static String generateJMXObjectName(String schedName, String schedInstId) {
        return "quartz:type=QuartzScheduler" + 
            ",name=" + schedName + 
            ",instance=" + schedInstId;
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品2024| 国产精品美女久久久久aⅴ国产馆| 亚洲午夜私人影院| 国产精品超碰97尤物18| 欧美高清www午色夜在线视频| 国产精品一卡二卡在线观看| 中文字幕综合网| 26uuu久久天堂性欧美| 欧美高清视频一二三区 | 欧美性受xxxx黑人xyx性爽| 亚洲成在人线免费| 亚洲成人中文在线| 亚洲欧美电影一区二区| 精品国产电影一区二区| 精品免费99久久| 欧美日韩日本视频| 日韩欧美亚洲国产精品字幕久久久 | 日本高清成人免费播放| 国产成人亚洲综合a∨猫咪| 精品写真视频在线观看| 国模少妇一区二区三区| 国产成人精品免费| 99精品在线观看视频| 91蜜桃免费观看视频| 91福利在线观看| 欧美一区二区大片| 久久亚洲精品国产精品紫薇| 亚洲精品一二三| 日产国产欧美视频一区精品| 国产一区二区导航在线播放| 色狠狠一区二区| 日韩色在线观看| 国产喷白浆一区二区三区| 亚洲精品久久久久久国产精华液| 麻豆91在线观看| 91蜜桃视频在线| 国产精品污污网站在线观看 | 国产精品色呦呦| 久热成人在线视频| 91黄色免费网站| 中文字幕中文在线不卡住| 亚洲愉拍自拍另类高清精品| 国产一区二区三区免费观看| 欧美二区乱c少妇| 国产精品日韩成人| 经典三级一区二区| 91久久香蕉国产日韩欧美9色| 久久你懂得1024| 国产麻豆一精品一av一免费| 欧美一区二区三区喷汁尤物| 亚洲手机成人高清视频| 国产91丝袜在线观看| 久久一区二区视频| 精品一区二区三区视频| 欧美一区二区免费| 洋洋成人永久网站入口| 国产不卡高清在线观看视频| 日韩欧美亚洲国产另类| 亚洲激情综合网| 国产精品白丝jk黑袜喷水| 在线视频综合导航| 亚洲国产aⅴ天堂久久| 在线综合+亚洲+欧美中文字幕| 国内不卡的二区三区中文字幕| 中文字幕一区二区三区四区不卡 | 欧美国产成人在线| 欧美日韩国产影片| 国产一区二区影院| 亚洲福利国产精品| 久久精品夜色噜噜亚洲aⅴ| 色婷婷精品久久二区二区蜜臂av| 午夜精品成人在线| 亚洲欧美韩国综合色| 国产日韩欧美精品在线| 欧美日韩一区视频| 不卡一区二区在线| 久久99国产精品久久99果冻传媒| 国产精品国产三级国产普通话蜜臀| 欧美日韩mp4| 91在线一区二区三区| 老司机免费视频一区二区三区| 夜夜夜精品看看| 亚洲免费av观看| 亚洲天堂中文字幕| 成人欧美一区二区三区白人 | 经典三级视频一区| 蜜臀av性久久久久蜜臀av麻豆| 亚洲一区视频在线观看视频| 亚洲婷婷在线视频| 亚洲精品v日韩精品| 亚洲三级理论片| 欧美激情中文字幕| 日韩天堂在线观看| 7777精品伊人久久久大香线蕉最新版 | 国产毛片精品一区| 国产一区不卡在线| 成人黄色大片在线观看| 成人国产一区二区三区精品| 成人午夜电影久久影院| 91美女在线视频| 欧美人妇做爰xxxⅹ性高电影| 欧美大片在线观看一区| 国产网站一区二区| 亚洲1区2区3区4区| 国产精品一区二区在线看| 成人91在线观看| 欧美日韩在线综合| 欧美sm美女调教| 一区二区日韩av| 久久精工是国产品牌吗| 国产99久久久久久免费看农村| 色偷偷久久人人79超碰人人澡| 欧美精品久久99| 亚洲欧美区自拍先锋| 精品一区二区三区在线视频| 日本道精品一区二区三区| 日韩欧美aaaaaa| 亚洲精品第一国产综合野| 国产精品一区二区久久精品爱涩 | 最新高清无码专区| 免费高清在线一区| 欧洲精品视频在线观看| 国产区在线观看成人精品| 免费成人性网站| 69p69国产精品| 日本麻豆一区二区三区视频| 欧美三级日本三级少妇99| 中文字幕+乱码+中文字幕一区| 男女男精品网站| 51午夜精品国产| 亚洲一区二区三区国产| 在线观看www91| 一区二区三区四区国产精品| 99re热视频精品| 亚洲美女视频在线观看| 色综合久久久久| 亚洲你懂的在线视频| 欧美体内she精视频| 亚洲一线二线三线久久久| 色域天天综合网| 欧美艳星brazzers| 精品少妇一区二区三区视频免付费 | 日韩一卡二卡三卡| 蜜臀av一区二区| 国产精品久久久久一区二区三区共 | 国产一区亚洲一区| 欧美不卡一区二区| 成人黄色小视频| 亚洲精品国产a久久久久久| 欧美男人的天堂一二区| 国产最新精品免费| 亚洲免费视频成人| 日韩欧美中文一区二区| www.欧美.com| 日韩精品一级二级| 中文字幕欧美激情| 欧美日韩亚州综合| hitomi一区二区三区精品| 性久久久久久久久久久久| 久久噜噜亚洲综合| 欧美日韩精品欧美日韩精品| 成人免费观看视频| 蜜桃在线一区二区三区| 亚洲三级在线免费| 国产农村妇女毛片精品久久麻豆| 欧美午夜电影一区| 99国产精品一区| 国产 日韩 欧美大片| 久久成人羞羞网站| 性欧美大战久久久久久久久| 亚洲免费电影在线| 亚洲欧洲国产日韩| 久久久777精品电影网影网 | 日本欧洲一区二区| 亚洲精品乱码久久久久久黑人| 国产亚洲一区二区三区| 日韩欧美一区二区不卡| 欧美一区二视频| 日韩一区二区视频| 欧美一区二区福利视频| 欧美精品久久久久久久多人混战| 欧美性猛片aaaaaaa做受| 91亚洲国产成人精品一区二区三 | 亚洲综合色在线| 精品人伦一区二区色婷婷| 日韩免费观看高清完整版在线观看| 欧美日韩在线三级| 色素色在线综合| 日本高清不卡视频| 在线亚洲免费视频| 白白色 亚洲乱淫| 欧美熟乱第一页| 91精品国产欧美一区二区| 精品国产乱码久久| 久久精品免视看| 中文字幕精品综合| 日韩在线卡一卡二| 黄色成人免费在线| 日韩电影免费在线观看网站| 久久超碰97中文字幕|