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

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

?? jobstoresupport.java

?? Java中非常實用流控制工具
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
     * Store the given <code>{@link org.quartz.JobDetail}</code>.
     * </p>
     * 
     * @param newJob
     *          The <code>JobDetail</code> to be stored.
     * @param replaceExisting
     *          If <code>true</code>, any <code>Job</code> existing in the
     *          <code>JobStore</code> with the same name & group should be
     *          over-written.
     * @throws ObjectAlreadyExistsException
     *           if a <code>Job</code> with the same name/group already
     *           exists, and replaceExisting is set to false.
     */
    public void storeJob(final SchedulingContext ctxt, final JobDetail newJob,
        final boolean replaceExisting) throws ObjectAlreadyExistsException, JobPersistenceException {
        executeInLock(
            (isLockOnInsert() || replaceExisting) ? LOCK_TRIGGER_ACCESS : null,
            new VoidTransactionCallback() {
                public void execute(Connection conn) throws JobPersistenceException {
                    storeJob(conn, ctxt, newJob, replaceExisting);
                }
            });
    }
    
    /**
     * <p>
     * Insert or update a job.
     * </p>
     */
    protected void storeJob(Connection conn, SchedulingContext ctxt,
            JobDetail newJob, boolean replaceExisting)
        throws ObjectAlreadyExistsException, JobPersistenceException {
        if (newJob.isVolatile() && isClustered()) {
            getLog().info(
                "note: volatile jobs are effectively non-volatile in a clustered environment.");
        }

        boolean existingJob = jobExists(conn, newJob.getName(), newJob
                .getGroup());
        try {
            if (existingJob) {
                if (!replaceExisting) { 
                    throw new ObjectAlreadyExistsException(newJob); 
                }
                getDelegate().updateJobDetail(conn, newJob);
            } else {
                getDelegate().insertJobDetail(conn, newJob);
            }
        } catch (IOException e) {
            throw new JobPersistenceException("Couldn't store job: "
                    + e.getMessage(), e);
        } catch (SQLException e) {
            throw new JobPersistenceException("Couldn't store job: "
                    + e.getMessage(), e);
        }
    }

    /**
     * <p>
     * Check existence of a given job.
     * </p>
     */
    protected boolean jobExists(Connection conn, String jobName,
            String groupName) throws JobPersistenceException {
        try {
            return getDelegate().jobExists(conn, jobName, groupName);
        } catch (SQLException e) {
            throw new JobPersistenceException(
                    "Couldn't determine job existence (" + groupName + "."
                            + jobName + "): " + e.getMessage(), e);
        }
    }


    /**
     * <p>
     * Store the given <code>{@link org.quartz.Trigger}</code>.
     * </p>
     * 
     * @param newTrigger
     *          The <code>Trigger</code> to be stored.
     * @param replaceExisting
     *          If <code>true</code>, any <code>Trigger</code> existing in
     *          the <code>JobStore</code> with the same name & group should
     *          be over-written.
     * @throws ObjectAlreadyExistsException
     *           if a <code>Trigger</code> with the same name/group already
     *           exists, and replaceExisting is set to false.
     */
    public void storeTrigger(final SchedulingContext ctxt, final Trigger newTrigger,
        final boolean replaceExisting) throws ObjectAlreadyExistsException,
            JobPersistenceException {
        executeInLock(
            (isLockOnInsert() || replaceExisting) ? LOCK_TRIGGER_ACCESS : null,
            new VoidTransactionCallback() {
                public void execute(Connection conn) throws JobPersistenceException {
                    storeTrigger(conn, ctxt, newTrigger, null, replaceExisting,
                        STATE_WAITING, false, false);
                }
            });
    }
    
    /**
     * <p>
     * Insert or update a trigger.
     * </p>
     */
    protected void storeTrigger(Connection conn, SchedulingContext ctxt,
            Trigger newTrigger, JobDetail job, boolean replaceExisting, String state,
            boolean forceState, boolean recovering)
        throws ObjectAlreadyExistsException, JobPersistenceException {
        if (newTrigger.isVolatile() && isClustered()) {
            getLog().info(
                "note: volatile triggers are effectively non-volatile in a clustered environment.");
        }

        boolean existingTrigger = triggerExists(conn, newTrigger.getName(),
                newTrigger.getGroup());

        if ((existingTrigger) && (!replaceExisting)) { 
            throw new ObjectAlreadyExistsException(newTrigger); 
        }
        
        try {

            boolean shouldBepaused = false;

            if (!forceState) {
                shouldBepaused = getDelegate().isTriggerGroupPaused(
                        conn, newTrigger.getGroup());

                if(!shouldBepaused) {
                    shouldBepaused = getDelegate().isTriggerGroupPaused(conn,
                            ALL_GROUPS_PAUSED);

                    if (shouldBepaused) {
                        getDelegate().insertPausedTriggerGroup(conn, newTrigger.getGroup());
                    }
                }

                if (shouldBepaused && (state.equals(STATE_WAITING) || state.equals(STATE_ACQUIRED))) {
                    state = STATE_PAUSED;
                }
            }

            if(job == null) {
                job = getDelegate().selectJobDetail(conn,
                    newTrigger.getJobName(), newTrigger.getJobGroup(),
                    getClassLoadHelper());
            }
            if (job == null) {
                throw new JobPersistenceException("The job ("
                        + newTrigger.getFullJobName()
                        + ") referenced by the trigger does not exist.");
            }
            if (job.isVolatile() && !newTrigger.isVolatile()) {
                throw new JobPersistenceException(
                        "It does not make sense to "
                                + "associate a non-volatile Trigger with a volatile Job!");
            }

            if (job.isStateful() && !recovering) { 
                state = checkBlockedState(conn, ctxt, job.getName(), 
                        job.getGroup(), state);
            }
            
            if (existingTrigger) {
                if (newTrigger instanceof SimpleTrigger && ((SimpleTrigger)newTrigger).hasAdditionalProperties() == false ) {
                    getDelegate().updateSimpleTrigger(conn,
                            (SimpleTrigger) newTrigger);
                } else if (newTrigger instanceof CronTrigger && ((CronTrigger)newTrigger).hasAdditionalProperties() == false ) {
                    getDelegate().updateCronTrigger(conn,
                            (CronTrigger) newTrigger);
                } else {
                    getDelegate().updateBlobTrigger(conn, newTrigger);
                }
                getDelegate().updateTrigger(conn, newTrigger, state, job);
            } else {
                getDelegate().insertTrigger(conn, newTrigger, state, job);
                if (newTrigger instanceof SimpleTrigger && ((SimpleTrigger)newTrigger).hasAdditionalProperties() == false ) {
                    getDelegate().insertSimpleTrigger(conn,
                            (SimpleTrigger) newTrigger);
                } else if (newTrigger instanceof CronTrigger && ((CronTrigger)newTrigger).hasAdditionalProperties() == false ) {
                    getDelegate().insertCronTrigger(conn,
                            (CronTrigger) newTrigger);
                } else {
                    getDelegate().insertBlobTrigger(conn, newTrigger);
                }
            }
        } catch (Exception e) {
            throw new JobPersistenceException("Couldn't store trigger '" + newTrigger.getName() + "' for '" 
                    + newTrigger.getJobName() + "' job:" + e.getMessage(), e);
        }
    }

    /**
     * <p>
     * Check existence of a given trigger.
     * </p>
     */
    protected boolean triggerExists(Connection conn, String triggerName,
            String groupName) throws JobPersistenceException {
        try {
            return getDelegate().triggerExists(conn, triggerName, groupName);
        } catch (SQLException e) {
            throw new JobPersistenceException(
                    "Couldn't determine trigger existence (" + groupName + "."
                            + triggerName + "): " + e.getMessage(), e);
        }
    }

    /**
     * <p>
     * Remove (delete) the <code>{@link org.quartz.Job}</code> with the given
     * name, and any <code>{@link org.quartz.Trigger}</code> s that reference
     * it.
     * </p>
     * 
     * <p>
     * If removal of the <code>Job</code> results in an empty group, the
     * group should be removed from the <code>JobStore</code>'s list of
     * known group names.
     * </p>
     * 
     * @param jobName
     *          The name of the <code>Job</code> to be removed.
     * @param groupName
     *          The group name of the <code>Job</code> to be removed.
     * @return <code>true</code> if a <code>Job</code> with the given name &
     *         group was found and removed from the store.
     */
    public boolean removeJob(final SchedulingContext ctxt, final String jobName,
        final String groupName) throws JobPersistenceException {
        return ((Boolean)executeInLock(
                LOCK_TRIGGER_ACCESS,
                new TransactionCallback() {
                    public Object execute(Connection conn) throws JobPersistenceException {
                        return removeJob(conn, ctxt, jobName, groupName, true) ? 
                                Boolean.TRUE : Boolean.FALSE;
                    }
                })).booleanValue();
    }
    
    protected boolean removeJob(Connection conn, SchedulingContext ctxt,
            String jobName, String groupName, boolean activeDeleteSafe)
        throws JobPersistenceException {

        try {
            Key[] jobTriggers = getDelegate().selectTriggerNamesForJob(conn,
                    jobName, groupName);
            for (int i = 0; i < jobTriggers.length; ++i) {
                deleteTriggerAndChildren(
                    conn, jobTriggers[i].getName(), jobTriggers[i].getGroup());
            }

            return deleteJobAndChildren(conn, ctxt, jobName, groupName);
        } catch (SQLException e) {
            throw new JobPersistenceException("Couldn't remove job: "
                    + e.getMessage(), e);
        }
    }

    /**
     * Delete a job and its listeners.
     * 
     * @see #removeJob(Connection, SchedulingContext, String, String, boolean)
     * @see #removeTrigger(Connection, SchedulingContext, String, String)
     */
    private boolean deleteJobAndChildren(Connection conn, 
            SchedulingContext ctxt, String jobName, String groupName)
        throws NoSuchDelegateException, SQLException {
        getDelegate().deleteJobListeners(conn, jobName, groupName);

        return (getDelegate().deleteJobDetail(conn, jobName, groupName) > 0);
    }
    
    /**
     * Delete a trigger, its listeners, and its Simple/Cron/BLOB sub-table entry.
     * 
     * @see #removeJob(Connection, SchedulingContext, String, String, boolean)
     * @see #removeTrigger(Connection, SchedulingContext, String, String)
     * @see #replaceTrigger(Connection, SchedulingContext, String, String, Trigger)
     */
    private boolean deleteTriggerAndChildren(
            Connection conn, String triggerName, String triggerGroupName)
        throws SQLException, NoSuchDelegateException {
        DriverDelegate delegate = getDelegate();

        // Once it succeeds in deleting one sub-table entry it will not try the others.
        if ((delegate.deleteSimpleTrigger(conn, triggerName, triggerGroupName) == 0) && 
            (delegate.deleteCronTrigger(conn, triggerName, triggerGroupName) == 0)) {
            delegate.deleteBlobTrigger(conn, triggerName, triggerGroupName);
        }
        
        delegate.deleteTriggerListeners(conn, triggerName, triggerGroupName);
        
        return (delegate.deleteTrigger(conn, triggerName, triggerGroupName) > 0);
    }
    
    /**
     * <p>
     * Retrieve the <code>{@link org.quartz.JobDetail}</code> for the given
     * <code>{@link org.quartz.Job}</code>.
     * </p>
     * 
     * @param jobName
     *          The name of the <code>Job</code> to be retrieved.
     * @param groupName
     *          The group name of the <code>Job</code> to be retrieved.
     * @return The desired <code>Job</code>, or null if there is no match.
     */
    public JobDetail retrieveJob(final SchedulingContext ctxt, final String jobName,
            final String groupName) throws JobPersistenceException {
        return (JobDetail)executeWithoutLock( // no locks necessary for read...
            new TransactionCallback() {
                public Object execute(Connection conn) throws JobPersistenceException {
                    return retrieveJob(conn, ctxt, jobName, groupName);
                }
            });
    }
    
    protected JobDetail retrieveJob(Connection conn, SchedulingContext ctxt,
            String jobName, String groupName) throws JobPersistenceException {
        try {
            JobDetail job = getDelegate().selectJobDetail(conn, jobName,
                    groupName, getClassLoadHelper());
            if (job != null) {
                String[] listeners = getDelegate().selectJobListeners(conn,
                        jobName, groupName);
                for (int i = 0; i < listeners.length; ++i) {
                    job.addJobListener(listeners[i]);
                }
            }

            return job;
        } catch (ClassNotFoundException e) {
            throw new JobPersistenceException(
                    "Couldn't retrieve job because a required class was not found: "
                            + e.getMessage(), e,
                    SchedulerException.ERR_PERSISTENCE_JOB_DOES_NOT_EXIST);
        } catch (IOException e) {
            throw new JobPersistenceException(
                    "Couldn't retrieve job because the BLOB couldn't be deserialized: "
                            + e.getMessage(), e,
                    SchedulerException.ERR_PERSISTENCE_JOB_DOES_NOT_EXIST);
        } catch (SQLException e) {
            throw new JobPersistenceException("Couldn't retrieve job: "
                    + e.getMessage(), e);
        }
    }

    /**

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美在线观看视频在线| 91传媒视频在线播放| 欧美性极品少妇| 国产免费观看久久| 日欧美一区二区| 欧美在线不卡一区| 国产精品色在线| 国内精品伊人久久久久av一坑| 在线精品视频小说1| 国产精品久久久久四虎| 国产精品综合一区二区三区| 91精品国产91久久综合桃花| 樱花草国产18久久久久| av网站一区二区三区| 久久久久久**毛片大全| 精品一区二区三区视频在线观看| 欧美三级电影在线看| 亚洲精品高清视频在线观看| 菠萝蜜视频在线观看一区| 久久久久97国产精华液好用吗| 美女在线视频一区| 777xxx欧美| 三级欧美在线一区| 欧美日产在线观看| 性久久久久久久久久久久| 91国偷自产一区二区三区观看| 椎名由奈av一区二区三区| 成人在线综合网站| 中文字幕欧美日韩一区| 国产精品69久久久久水密桃| www久久精品| 国产在线观看免费一区| 精品国产乱码久久久久久久| 青青草成人在线观看| 69成人精品免费视频| 日韩精品午夜视频| 91精品国产色综合久久久蜜香臀| 亚洲第一电影网| 欧美精品日韩综合在线| 日韩av电影一区| 日韩免费观看2025年上映的电影| 麻豆91精品91久久久的内涵| 精品国产伦理网| 国产一区欧美二区| 国产偷v国产偷v亚洲高清| 国产成人av电影| 国产精品美女久久久久久久久| 成人av网站在线| 亚洲欧洲日产国码二区| 一本久久a久久免费精品不卡| 亚洲黄一区二区三区| 欧美日韩一区二区三区不卡| 偷拍日韩校园综合在线| 欧美一区二区久久| 精品系列免费在线观看| 国产欧美一区二区三区在线老狼| 国产成人av网站| 亚洲欧美日韩国产中文在线| 在线这里只有精品| 日本在线不卡视频一二三区| 精品88久久久久88久久久 | 国产精品高潮久久久久无| av亚洲精华国产精华精| 亚洲一级二级在线| 欧美美女网站色| 九九在线精品视频| 成人动漫精品一区二区| 一区二区三区在线观看国产| 欧美精品丝袜中出| 黄色日韩网站视频| 亚洲色图.com| 91精品国产综合久久香蕉麻豆| 激情都市一区二区| 亚洲天堂中文字幕| 777xxx欧美| 粉嫩绯色av一区二区在线观看| 一区二区三区色| 日韩欧美中文一区二区| a在线欧美一区| 香蕉成人伊视频在线观看| 久久久久久久一区| 欧美色中文字幕| 激情都市一区二区| 夜夜嗨av一区二区三区| 精品国偷自产国产一区| 色综合天天综合网国产成人综合天 | 国产精品免费av| 欧美日韩精品是欧美日韩精品| 精品一区在线看| 亚洲欧美日韩国产成人精品影院| 欧美一级在线免费| 99re热这里只有精品免费视频| 日本免费新一区视频| 中文乱码免费一区二区| 欧美日韩久久久久久| 国产精品一区二区无线| 亚洲成av人综合在线观看| 亚洲精品在线免费播放| 欧美一a一片一级一片| 国产精品一区专区| 五月开心婷婷久久| 中文字幕色av一区二区三区| 日韩丝袜情趣美女图片| 色猫猫国产区一区二在线视频| 久久国产精品无码网站| 亚洲男同性视频| 国产日本欧洲亚洲| 欧美电影在线免费观看| 91丨porny丨蝌蚪视频| 狠狠狠色丁香婷婷综合激情 | 国产精品久久久久影院老司 | jizz一区二区| 久久99精品久久久| 亚洲福利视频三区| 国产精品国产自产拍高清av| 日韩精品一区二区三区四区 | 亚洲精品成人在线| 亚洲国产精品成人综合| 日韩一级片网址| 欧美在线不卡一区| 99精品黄色片免费大全| 国产原创一区二区| 日本美女一区二区三区视频| 洋洋成人永久网站入口| 国产精品夫妻自拍| 久久久久久久久97黄色工厂| 日韩一级成人av| 欧美精品在线观看播放| 在线亚洲免费视频| 不卡欧美aaaaa| 国产乱妇无码大片在线观看| 免费亚洲电影在线| 午夜视频一区在线观看| 亚洲精品乱码久久久久久久久 | 欧美一区二区三区在线观看 | 91一区在线观看| av在线播放不卡| 国产91精品一区二区麻豆网站| 精品一区二区三区影院在线午夜 | 亚洲v精品v日韩v欧美v专区| 一区二区三区免费看视频| 亚洲视频一区在线| 日韩一区在线免费观看| 国产精品伦一区| 国产精品免费丝袜| 国产精品欧美综合在线| 国产亚洲精品精华液| 国产亚洲综合在线| 国产性做久久久久久| 久久精品一区二区三区不卡| 久久久不卡网国产精品二区| 26uuu亚洲婷婷狠狠天堂| 精品国产sm最大网站免费看| 日韩你懂的在线观看| 亚洲精品在线观| 久久久久久久久岛国免费| 久久精子c满五个校花| 欧美高清在线一区二区| 日本一区二区三区免费乱视频| 欧美国产精品中文字幕| 国产精品久久福利| 亚洲三级理论片| 亚洲图片欧美一区| 日韩成人一区二区| 老司机午夜精品| 国产精品中文欧美| 不卡的电视剧免费网站有什么| 91捆绑美女网站| 欧美在线观看禁18| 91精品国产福利| 久久网站最新地址| 中文字幕精品综合| 亚洲欧美乱综合| 亚洲成人免费观看| 看电影不卡的网站| 国产成人一区二区精品非洲| 国产成都精品91一区二区三| 99久久伊人网影院| 欧美在线观看一区二区| 欧美一区二区三级| 国产色婷婷亚洲99精品小说| **欧美大码日韩| 日韩中文字幕亚洲一区二区va在线| 日本不卡一二三| 久久这里只有精品6| ...xxx性欧美| 亚洲高清久久久| 国产综合色视频| 99久久久免费精品国产一区二区 | 国产精品亚洲成人| 色综合一区二区| 日韩欧美国产一区二区在线播放 | 国产白丝网站精品污在线入口| 国产一区二区精品在线观看| 国产精品夜夜嗨| 97se亚洲国产综合自在线不卡| 欧美三日本三级三级在线播放| 日韩精品最新网址| 亚洲欧洲无码一区二区三区| 日韩高清欧美激情|