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

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

?? directschedulerfactory.java

?? Quartz 是個開源的作業(yè)調(diào)度框架
?? 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.impl;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import org.quartz.Scheduler;import org.quartz.SchedulerException;import org.quartz.SchedulerFactory;import org.quartz.core.JobRunShellFactory;import org.quartz.core.QuartzScheduler;import org.quartz.core.QuartzSchedulerResources;import org.quartz.core.SchedulingContext;import org.quartz.simpl.CascadingClassLoadHelper;import org.quartz.simpl.RAMJobStore;import org.quartz.simpl.SimpleThreadPool;import org.quartz.spi.ClassLoadHelper;import org.quartz.spi.JobStore;import org.quartz.spi.ThreadPool;import java.util.Collection;/** * <p> * A singleton implementation of <code>{@link org.quartz.SchedulerFactory}</code>. * </p> *  * <p> * Here are some examples of using this class: * </p> * <p> * To create a scheduler that does not write anything to the database (is not * persistent), you can call <code>createVolatileScheduler</code>: *  * <pre> *  DirectSchedulerFactory.getInstance().createVolatileScheduler(10); // 10 threads * // don't forget to start the scheduler: DirectSchedulerFactory.getInstance().getScheduler().start(); * </pre> *  *  * <p> * Several create methods are provided for convenience. All create methods * eventually end up calling the create method with all the parameters: * </p> *  * <pre> *  public void createScheduler(String schedulerName, String schedulerInstanceId, ThreadPool threadPool, JobStore jobStore, String rmiRegistryHost, int rmiRegistryPort) * </pre> *  *  * <p> * Here is an example of using this method: * </p> *  * *  * <pre>// create the thread pool SimpleThreadPool threadPool = new SimpleThreadPool(maxThreads, Thread.NORM_PRIORITY); threadPool.initialize(); * // create the job store JobStore jobStore = new RAMJobStore(); jobStore.initialize(); *  *  DirectSchedulerFactory.getInstance().createScheduler("My Quartz Scheduler", "My Instance", threadPool, jobStore, "localhost", 1099); * // don't forget to start the scheduler: DirectSchedulerFactory.getInstance().getScheduler("My Quartz Scheduler", "My Instance").start(); * </pre> *  *  * <p> * You can also use a JDBCJobStore instead of the RAMJobStore: * </p> *  * <pre> *  DBConnectionManager.getInstance().addConnectionProvider("someDatasource", new JNDIConnectionProvider("someDatasourceJNDIName")); *  *  JDBCJobStore jdbcJobStore = new JDBCJobStore(); jdbcJobStore.setDataSource("someDatasource"); jdbcJobStore.setPostgresStyleBlobs(true); jdbcJobStore.setTablePrefix("QRTZ_"); jdbcJobStore.setInstanceId("My Instance"); jdbcJobStore.initialize(); * </pre> *  * @author Mohammad Rezaei * @author James House *  * @see JobStore * @see ThreadPool */public class DirectSchedulerFactory implements SchedulerFactory {    /*     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     *      * Constants.     *      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     */    public static final String DEFAULT_INSTANCE_ID = "SIMPLE_NON_CLUSTERED";    public static final String DEFAULT_SCHEDULER_NAME = "SimpleQuartzScheduler";    /*     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     *      * Data members.     *      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     */    private boolean initialized = false;    private static DirectSchedulerFactory instance = new DirectSchedulerFactory();    /*     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     *      * Constructors.     *      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     */    private Log getLog() {        return LogFactory.getLog(DirectSchedulerFactory.class);    }    /**     * Constructor     */    protected DirectSchedulerFactory() {    }    /*     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     *      * Interface.     *      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     */    public static DirectSchedulerFactory getInstance() {        return instance;    }    /**     * Creates an in memory job store (<code>{@link RAMJobStore}</code>)     * The thread priority is set to Thread.NORM_PRIORITY     *      * @param maxThreads     *          The number of threads in the thread pool     * @throws SchedulerException     *           if initialization failed.     */    public void createVolatileScheduler(int maxThreads)            throws SchedulerException {        SimpleThreadPool threadPool = new SimpleThreadPool(maxThreads,                Thread.NORM_PRIORITY);        threadPool.initialize();        JobStore jobStore = new RAMJobStore();        this.createScheduler(threadPool, jobStore);    }    /**     * @deprecated see correctly spelled method.     * @see #createVolatileScheduler(int)     */    public void createVolatileSchduler(int maxThreads)        throws SchedulerException {        createVolatileScheduler(maxThreads);    }        /**     * Creates a proxy to a remote scheduler. This scheduler can be retrieved     * via {@link DirectSchedulerFactory#getScheduler()}     *      * @param rmiHost     *          The hostname for remote scheduler     * @param rmiPort     *          Port for the remote scheduler. The default RMI port is 1099.     * @throws SchedulerException     *           if the remote scheduler could not be reached.     */    public void createRemoteScheduler(String rmiHost, int rmiPort)            throws SchedulerException {        createRemoteScheduler(DEFAULT_SCHEDULER_NAME, DEFAULT_INSTANCE_ID,                rmiHost, rmiPort);        initialized = true;    }    /**     * Same as     * {@link DirectSchedulerFactory#createRemoteScheduler(String rmiHost, int rmiPort)},     * with the addition of specifying the scheduler name and instance ID. This     * scheduler can only be retrieved via     * {@link DirectSchedulerFactory#getScheduler(String)}     *      * @param schedulerName     *          The name for the scheduler.     * @param schedulerInstanceId     *          The instance ID for the scheduler.     * @param rmiHost     *          The hostname for remote scheduler     * @param rmiPort     *          Port for the remote scheduler. The default RMI port is 1099.     * @throws SchedulerException     *           if the remote scheduler could not be reached.     */    protected void createRemoteScheduler(String schedulerName,            String schedulerInstanceId, String rmiHost, int rmiPort)            throws SchedulerException {        SchedulingContext schedCtxt = new SchedulingContext();        schedCtxt.setInstanceId(schedulerInstanceId);        String uid = QuartzSchedulerResources.getUniqueIdentifier(                schedulerName, schedulerInstanceId);        RemoteScheduler remoteScheduler = new RemoteScheduler(schedCtxt, uid,                rmiHost, rmiPort);        SchedulerRepository schedRep = SchedulerRepository.getInstance();        schedRep.bind(remoteScheduler);    }    /**     * Creates a scheduler using the specified thread pool and job store. This     * scheduler can be retrieved via     * {@link DirectSchedulerFactory#getScheduler()}     *      * @param threadPool     *          The thread pool for executing jobs     * @param jobStore     *          The type of job store     * @throws SchedulerException     *           if initialization failed     */    public void createScheduler(ThreadPool threadPool, JobStore jobStore)            throws SchedulerException {        createScheduler(DEFAULT_SCHEDULER_NAME, DEFAULT_INSTANCE_ID,                threadPool, jobStore);        initialized = true;    }    /**     * Same as     * {@link DirectSchedulerFactory#createScheduler(ThreadPool threadPool, JobStore jobStore)},     * with the addition of specifying the scheduler name and instance ID. This     * scheduler can only be retrieved via     * {@link DirectSchedulerFactory#getScheduler(String)}     *      * @param schedulerName     *          The name for the scheduler.     * @param schedulerInstanceId     *          The instance ID for the scheduler.     * @param threadPool     *          The thread pool for executing jobs     * @param jobStore     *          The type of job store     * @throws SchedulerException     *           if initialization failed     */    public void createScheduler(String schedulerName,            String schedulerInstanceId, ThreadPool threadPool, JobStore jobStore)            throws SchedulerException {        createScheduler(schedulerName, schedulerInstanceId, threadPool,                jobStore, null, 0, -1, -1);    }    /**     * Creates a scheduler using the specified thread pool and job store and     * binds it to RMI.     *      * @param schedulerName     *          The name for the scheduler.     * @param schedulerInstanceId     *          The instance ID for the scheduler.     * @param threadPool     *          The thread pool for executing jobs     * @param jobStore     *          The type of job store     * @param rmiRegistryHost     *          The hostname to register this scheduler with for RMI. Can use     *          "null" if no RMI is required.     * @param rmiRegistryPort     *          The port for RMI. Typically 1099.     * @param idleWaitTime     *          The idle wait time in milliseconds. You can specify "-1" for     *          the default value, which is currently 30000 ms.     * @throws SchedulerException     *           if initialization failed     */    public void createScheduler(String schedulerName,            String schedulerInstanceId, ThreadPool threadPool,            JobStore jobStore, String rmiRegistryHost, int rmiRegistryPort,            long idleWaitTime, long dbFailureRetryInterval)            throws SchedulerException {        // Currently only one run-shell factory is available...        JobRunShellFactory jrsf = new StdJobRunShellFactory();        // Fire everything up        // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~        SchedulingContext schedCtxt = new SchedulingContext();        schedCtxt.setInstanceId(schedulerInstanceId);        QuartzSchedulerResources qrs = new QuartzSchedulerResources();        qrs.setName(schedulerName);        qrs.setInstanceId(schedulerInstanceId);        qrs.setJobRunShellFactory(jrsf);        qrs.setThreadPool(threadPool);        qrs.setJobStore(jobStore);        qrs.setRMIRegistryHost(rmiRegistryHost);        qrs.setRMIRegistryPort(rmiRegistryPort);        QuartzScheduler qs = new QuartzScheduler(qrs, schedCtxt, idleWaitTime,                dbFailureRetryInterval);        ClassLoadHelper cch = new CascadingClassLoadHelper();        cch.initialize();                jobStore.initialize(cch, qs.getSchedulerSignaler());        Scheduler scheduler = new StdScheduler(qs, schedCtxt);        jrsf.initialize(scheduler, schedCtxt);        getLog().info("Quartz scheduler '" + scheduler.getSchedulerName());        getLog().info("Quartz scheduler version: " + qs.getVersion());        SchedulerRepository schedRep = SchedulerRepository.getInstance();        qs.addNoGCObject(schedRep); // prevents the repository from being        // garbage collected        schedRep.bind(scheduler);    }    /*     * public void registerSchedulerForRmi(String schedulerName, String     * schedulerId, String registryHost, int registryPort) throws     * SchedulerException, RemoteException { QuartzScheduler scheduler =     * (QuartzScheduler) this.getScheduler(); scheduler.bind(registryHost,     * registryPort); }     */    /**     * <p>     * Returns a handle to the Scheduler produced by this factory.     * </p>     *      * <p>     * you must call createRemoteScheduler or createScheduler methods before     * calling getScheduler()     * </p>     */    public Scheduler getScheduler() throws SchedulerException {        if (!initialized) { throw new SchedulerException(                "you must call createRemoteScheduler or createScheduler methods before calling getScheduler()"); }        SchedulerRepository schedRep = SchedulerRepository.getInstance();        return schedRep.lookup(DEFAULT_SCHEDULER_NAME);    }    /**     * <p>     * Returns a handle to the Scheduler with the given name, if it exists.     * </p>     */    public Scheduler getScheduler(String schedName) throws SchedulerException {        SchedulerRepository schedRep = SchedulerRepository.getInstance();        return schedRep.lookup(schedName);    }    /**     * <p>     * Returns a handle to all known Schedulers (made by any     * StdSchedulerFactory instance.).     * </p>     */    public Collection getAllSchedulers() throws SchedulerException {        return SchedulerRepository.getInstance().lookupAll();    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕精品一区二区三区精品| 欧美亚洲综合一区| 久久久久久电影| 国产成人高清在线| 亚洲欧洲日产国产综合网| 日本精品一区二区三区四区的功能| 亚洲女同ⅹxx女同tv| 欧美性生活大片视频| 欧美bbbbb| 国产欧美精品在线观看| 99re6这里只有精品视频在线观看| 亚洲综合区在线| 欧美一激情一区二区三区| 国产成人av在线影院| 亚洲激情网站免费观看| 8x福利精品第一导航| 国产成人在线视频播放| 亚洲综合色视频| 久久影音资源网| 97久久精品人人澡人人爽| 午夜精品福利一区二区三区av| 精品人伦一区二区色婷婷| av在线不卡电影| 亚洲国产精品久久人人爱蜜臀| 日韩免费在线观看| 91猫先生在线| 狠狠色狠狠色综合系列| 亚洲天堂福利av| 日韩一级视频免费观看在线| 成人黄色免费短视频| 日本欧美在线看| 中文字幕日韩一区| 欧美xxxx在线观看| 在线免费不卡电影| 国产成人精品午夜视频免费| 午夜欧美电影在线观看| 国产精品―色哟哟| 欧美一区二区美女| 欧美在线看片a免费观看| 韩国一区二区视频| 视频一区二区三区入口| 亚洲欧洲成人av每日更新| 日韩美女一区二区三区| 日本韩国精品在线| 成人深夜福利app| 精品一二三四区| 亚洲国产欧美日韩另类综合| 欧美激情中文字幕| 精品美女一区二区三区| 欧美日韩一二三| 99re成人精品视频| 国产成人午夜高潮毛片| 免费三级欧美电影| 亚洲成人资源网| 最新不卡av在线| 国产欧美一区二区三区鸳鸯浴| 欧美高清视频不卡网| 91麻豆福利精品推荐| 国产v日产∨综合v精品视频| 久久99在线观看| 奇米影视一区二区三区| 视频一区视频二区中文字幕| 亚洲自拍欧美精品| 玉米视频成人免费看| 日韩久久一区二区| 中文文精品字幕一区二区| 欧美精品一区二区三区很污很色的 | 久久66热偷产精品| 日本v片在线高清不卡在线观看| 一区二区三区在线观看动漫| 亚洲精品视频在线观看免费| 国产精品国产三级国产| 国产午夜亚洲精品羞羞网站| 26uuu成人网一区二区三区| 欧美成人性福生活免费看| 日韩三级电影网址| 精品久久人人做人人爱| 久久综合九色综合97婷婷 | 欧美视频中文字幕| 欧美视频中文字幕| 91精品国产综合久久久久| 欧美日韩aaaaaa| 日韩一区二区三区电影在线观看| 欧美一区日韩一区| 欧美一级电影网站| 久久久久久综合| 国产精品免费丝袜| 亚洲女人小视频在线观看| 亚洲图片欧美视频| 久久疯狂做爰流白浆xx| 高清视频一区二区| 色综合久久久网| 欧美日本不卡视频| 精品国产制服丝袜高跟| 国产亚洲美州欧州综合国| 中文字幕亚洲电影| 婷婷久久综合九色综合伊人色| 蜜臀久久99精品久久久久久9| 国产呦萝稀缺另类资源| 99久久久精品免费观看国产蜜| 色偷偷久久人人79超碰人人澡| 欧美日韩成人一区二区| 精品国产乱码久久久久久蜜臀| 中文一区二区在线观看| 亚洲一区二区高清| 狠狠久久亚洲欧美| 91女神在线视频| 欧美一区二区福利在线| 国产日韩欧美综合一区| 一区二区视频在线| 日本伊人色综合网| 菠萝蜜视频在线观看一区| 欧美色中文字幕| 久久亚洲精华国产精华液 | 艳妇臀荡乳欲伦亚洲一区| 美女视频黄a大片欧美| 99精品欧美一区二区蜜桃免费| 欧美日韩亚洲高清一区二区| 久久久午夜电影| 婷婷六月综合网| 不卡视频一二三四| 日韩欧美123| 一区二区三区在线视频免费| 精品一区二区三区视频在线观看| 99视频在线观看一区三区| 日韩欧美在线影院| 夜色激情一区二区| 不卡的av网站| 久久天堂av综合合色蜜桃网| 亚洲激情成人在线| 成人一区二区三区中文字幕| 制服.丝袜.亚洲.中文.综合| 亚洲欧洲日韩在线| 国产很黄免费观看久久| 欧美一区二区成人| 一区二区高清免费观看影视大全| 国产大陆a不卡| 精品剧情在线观看| 天天色天天操综合| 欧美性极品少妇| 亚洲欧洲制服丝袜| 成人99免费视频| 久久久91精品国产一区二区三区| 日本一不卡视频| 欧美亚洲综合网| 亚洲精品乱码久久久久久久久| 国产成人综合在线| 精品三级av在线| 日本女优在线视频一区二区| 欧美伊人精品成人久久综合97| 中文字幕亚洲一区二区av在线| 国产精品系列在线观看| 26uuu精品一区二区三区四区在线| 丝袜亚洲另类欧美综合| 欧美三区在线视频| 亚洲午夜一区二区三区| 欧美亚洲综合网| 亚洲午夜私人影院| 欧美日韩一区小说| 性感美女久久精品| 欧美三级韩国三级日本三斤| 亚洲综合在线观看视频| 欧美影视一区在线| 日韩综合小视频| 欧美一区二区三区公司| 免费高清成人在线| 欧美tk丨vk视频| 国产精品一区二区久激情瑜伽| 亚洲精品一区二区三区影院| 国产一区高清在线| 国产精品嫩草影院av蜜臀| jvid福利写真一区二区三区| 中文字幕一区av| 欧美婷婷六月丁香综合色| 爽爽淫人综合网网站| 日韩精品一区二区三区swag | 欧美一级日韩不卡播放免费| 日本最新不卡在线| 亚洲精品一线二线三线| 粉嫩av一区二区三区| 亚洲少妇中出一区| 欧美视频自拍偷拍| 伦理电影国产精品| 日本一区二区三区电影| jlzzjlzz亚洲日本少妇| 亚洲高清免费在线| 精品少妇一区二区三区视频免付费 | 欧美一区二区三区爱爱| 精品亚洲国内自在自线福利| 国产欧美精品区一区二区三区 | 亚洲欧美日韩国产综合在线| 日本高清无吗v一区| 日av在线不卡| 中文字幕国产一区二区| 一本大道久久a久久综合婷婷| 日韩1区2区3区| 中文字幕精品一区二区三区精品| 欧洲中文字幕精品| 玖玖九九国产精品| 亚洲区小说区图片区qvod|