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

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

?? stdjdbcdelegate.java

?? Quartz 是個開源的作業調度框架
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/* 
 * 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.jdbcjobstore;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.math.BigDecimal;
import java.sql.Blob;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Iterator;
import java.util.HashMap;
import java.util.Set;
import java.util.Properties;
import java.util.TimeZone;

import org.apache.commons.logging.Log;
import org.quartz.Calendar;
import org.quartz.CronTrigger;
import org.quartz.JobDataMap;
import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.quartz.SimpleTrigger;
import org.quartz.Trigger;
import org.quartz.spi.ClassLoadHelper;
import org.quartz.utils.Key;
import org.quartz.utils.TriggerStatus;

/**
 * <p>
 * This is meant to be an abstract base class for most, if not all, <code>{@link org.quartz.impl.jdbcjobstore.DriverDelegate}</code>
 * implementations. Subclasses should override only those methods that need
 * special handling for the DBMS driver in question.
 * </p>
 * 
 * @author <a href="mailto:jeff@binaryfeed.org">Jeffrey Wescott</a>
 * @author James House
 */
public class StdJDBCDelegate implements DriverDelegate, StdJDBCConstants {

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

    protected Log logger = null;

    protected String tablePrefix = DEFAULT_TABLE_PREFIX;

    protected String instanceId;

    protected boolean useProperties;

    /*
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * 
     * Constructors.
     * 
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     */

    /**
     * <p>
     * Create new StdJDBCDelegate instance.
     * </p>
     * 
     * @param logger
     *          the logger to use during execution
     * @param tablePrefix
     *          the prefix of all table names
     */
    public StdJDBCDelegate(Log logger, String tablePrefix, String instanceId) {
        this.logger = logger;
        this.tablePrefix = tablePrefix;
        this.instanceId = instanceId;
    }

    /**
     * <p>
     * Create new StdJDBCDelegate instance.
     * </p>
     * 
     * @param logger
     *          the logger to use during execution
     * @param tablePrefix
     *          the prefix of all table names
     */
    public StdJDBCDelegate(Log logger, String tablePrefix, String instanceId,
            Boolean useProperties) {
        this.logger = logger;
        this.tablePrefix = tablePrefix;
        this.instanceId = instanceId;
        this.useProperties = useProperties.booleanValue();
    }

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

    protected boolean canUseProperties() {
        return useProperties;
    }

    //---------------------------------------------------------------------------
    // startup / recovery
    //---------------------------------------------------------------------------

    /**
     * <p>
     * Insert the job detail record.
     * </p>
     * 
     * @param conn
     *          the DB Connection
     * @param newState
     *          the new state for the triggers
     * @param oldState1
     *          the first old state to update
     * @param oldState2
     *          the second old state to update
     * @return number of rows updated
     */
    public int updateTriggerStatesFromOtherStates(Connection conn,
            String newState, String oldState1, String oldState2)
            throws SQLException {
        PreparedStatement ps = null;

        try {
            ps = conn
                    .prepareStatement(rtp(UPDATE_TRIGGER_STATES_FROM_OTHER_STATES));
            ps.setString(1, newState);
            ps.setString(2, oldState1);
            ps.setString(3, oldState2);
            return ps.executeUpdate();
        } finally {
            if (null != ps) {
                try {
                    ps.close();
                } catch (SQLException ignore) {
                }
            }
        }
    }

    /**
     * <p>
     * Get the names of all of the triggers that have misfired.
     * </p>
     * 
     * @param conn
     *          the DB Connection
     * @return an array of <code>{@link
     * org.quartz.utils.Key}</code> objects
     */
    public Key[] selectMisfiredTriggers(Connection conn, long ts)
            throws SQLException {
        PreparedStatement ps = null;
        ResultSet rs = null;

        try {
            ps = conn.prepareStatement(rtp(SELECT_MISFIRED_TRIGGERS));
            ps.setBigDecimal(1, new BigDecimal(String.valueOf(ts)));
            rs = ps.executeQuery();

            ArrayList list = new ArrayList();
            while (rs.next()) {
                String triggerName = rs.getString(COL_TRIGGER_NAME);
                String groupName = rs.getString(COL_TRIGGER_GROUP);
                list.add(new Key(triggerName, groupName));
            }
            Object[] oArr = list.toArray();
            Key[] kArr = new Key[oArr.length];
            System.arraycopy(oArr, 0, kArr, 0, oArr.length);
            return kArr;
        } finally {
            if (null != rs) {
                try {
                    rs.close();
                } catch (SQLException ignore) {
                }
            }
            if (null != ps) {
                try {
                    ps.close();
                } catch (SQLException ignore) {
                }
            }
        }
    }

    /**
     * <p>
     * Select all of the triggers in a given state.
     * </p>
     * 
     * @param conn
     *          the DB Connection
     * @param state
     *          the state the triggers must be in
     * @return an array of trigger <code>Key</code> s
     */
    public Key[] selectTriggersInState(Connection conn, String state)
            throws SQLException {
        PreparedStatement ps = null;
        ResultSet rs = null;

        try {
            ps = conn.prepareStatement(rtp(SELECT_TRIGGERS_IN_STATE));
            ps.setString(1, state);
            rs = ps.executeQuery();

            ArrayList list = new ArrayList();
            while (rs.next()) {
                list.add(new Key(rs.getString(1), rs.getString(2)));
            }

            Key[] sArr = (Key[]) list.toArray(new Key[list.size()]);
            return sArr;
        } finally {
            if (null != rs) {
                try {
                    rs.close();
                } catch (SQLException ignore) {
                }
            }
            if (null != ps) {
                try {
                    ps.close();
                } catch (SQLException ignore) {
                }
            }
        }
    }

    public Key[] selectMisfiredTriggersInState(Connection conn, String state,
            long ts) throws SQLException {
        PreparedStatement ps = null;
        ResultSet rs = null;

        try {
            ps = conn.prepareStatement(rtp(SELECT_MISFIRED_TRIGGERS_IN_STATE));
            ps.setBigDecimal(1, new BigDecimal(String.valueOf(ts)));
            ps.setString(2, state);
            rs = ps.executeQuery();

            ArrayList list = new ArrayList();
            while (rs.next()) {
                String triggerName = rs.getString(COL_TRIGGER_NAME);
                String groupName = rs.getString(COL_TRIGGER_GROUP);
                list.add(new Key(triggerName, groupName));
            }
            Object[] oArr = list.toArray();
            Key[] kArr = new Key[oArr.length];
            System.arraycopy(oArr, 0, kArr, 0, oArr.length);
            return kArr;
        } finally {
            if (null != rs) {
                try {
                    rs.close();
                } catch (SQLException ignore) {
                }
            }
            if (null != ps) {
                try {
                    ps.close();
                } catch (SQLException ignore) {
                }
            }
        }
    }

    /**
     * <p>
     * Get the names of all of the triggers in the given group and state that
     * have misfired.
     * </p>
     * 
     * @param conn
     *          the DB Connection
     * @return an array of <code>{@link
     * org.quartz.utils.Key}</code> objects
     */
    public Key[] selectMisfiredTriggersInGroupInState(Connection conn,
            String groupName, String state, long ts) throws SQLException {
        PreparedStatement ps = null;
        ResultSet rs = null;

        try {
            ps = conn
                    .prepareStatement(rtp(SELECT_MISFIRED_TRIGGERS_IN_GROUP_IN_STATE));
            ps.setBigDecimal(1, new BigDecimal(String.valueOf(ts)));
            ps.setString(2, groupName);
            ps.setString(3, state);
            rs = ps.executeQuery();

            ArrayList list = new ArrayList();
            while (rs.next()) {
                String triggerName = rs.getString(COL_TRIGGER_NAME);
                list.add(new Key(triggerName, groupName));
            }
            Object[] oArr = list.toArray();
            Key[] kArr = new Key[oArr.length];
            System.arraycopy(oArr, 0, kArr, 0, oArr.length);
            return kArr;
        } finally {
            if (null != rs) {
                try {
                    rs.close();
                } catch (SQLException ignore) {
                }
            }
            if (null != ps) {
                try {
                    ps.close();
                } catch (SQLException ignore) {
                }
            }
        }
    }

    /**
     * <p>
     * Select all of the triggers for jobs that are requesting recovery. The
     * returned trigger objects will have unique "recoverXXX" trigger names and
     * will be in the <code>{@link
     * org.quartz.Scheduler}.DEFAULT_RECOVERY_GROUP</code>
     * trigger group.
     * </p>
     * 
     * <p>
     * In order to preserve the ordering of the triggers, the fire time will be
     * set from the <code>COL_FIRED_TIME</code> column in the <code>TABLE_FIRED_TRIGGERS</code>
     * table. The caller is responsible for calling <code>computeFirstFireTime</code>
     * on each returned trigger. It is also up to the caller to insert the
     * returned triggers to ensure that they are fired.
     * </p>
     * 
     * @param conn
     *          the DB Connection
     * @return an array of <code>{@link org.quartz.Trigger}</code> objects
     */
    public Trigger[] selectTriggersForRecoveringJobs(Connection conn)
            throws SQLException, IOException, ClassNotFoundException {
        PreparedStatement ps = null;
        ResultSet rs = null;

        try {
            ps = conn
                    .prepareStatement(rtp(SELECT_INSTANCES_RECOVERABLE_FIRED_TRIGGERS));
            ps.setString(1, instanceId);
            ps.setBoolean(2, true);
            rs = ps.executeQuery();

            long dumId = System.currentTimeMillis();
            ArrayList list = new ArrayList();
            while (rs.next()) {
                String jobName = rs.getString(COL_JOB_NAME);
                String jobGroup = rs.getString(COL_JOB_GROUP);
                String trigName = rs.getString(COL_TRIGGER_NAME);
                String trigGroup = rs.getString(COL_TRIGGER_GROUP);
                long firedTime = rs.getLong(COL_FIRED_TIME);
                SimpleTrigger rcvryTrig = new SimpleTrigger("recover_"
                        + instanceId + "_" + String.valueOf(dumId++),
                        Scheduler.DEFAULT_RECOVERY_GROUP, new Date(firedTime));
                rcvryTrig.setJobName(jobName);
                rcvryTrig.setJobGroup(jobGroup);
                rcvryTrig
                        .setMisfireInstruction(SimpleTrigger.MISFIRE_INSTRUCTION_FIRE_NOW);

                JobDataMap jd = selectTriggerJobDataMap(conn, trigName, trigGroup);
                jd.put("QRTZ_FAILED_JOB_ORIG_TRIGGER_NAME", trigName);
                jd.put("QRTZ_FAILED_JOB_ORIG_TRIGGER_GROUP", trigGroup);
                jd.put("QRTZ_FAILED_JOB_ORIG_TRIGGER_FIRETIME_IN_MILLISECONDS_AS_STRING", String.valueOf(firedTime));
                rcvryTrig.setJobDataMap(jd);
                
                list.add(rcvryTrig);
            }
            Object[] oArr = list.toArray();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色婷婷国产精品久久包臀| 国产成人亚洲综合a∨婷婷| 无码av免费一区二区三区试看| 日韩在线一二三区| 欧美精品1区2区| 麻豆精品在线视频| 国产午夜精品福利| 琪琪一区二区三区| 色婷婷激情综合| 午夜精品久久久| 欧美精品一区视频| 日韩福利视频导航| 久久夜色精品一区| 91视频在线观看| 石原莉奈在线亚洲二区| 2021久久国产精品不只是精品| 丝袜亚洲精品中文字幕一区| 日韩欧美亚洲一区二区| 丁香另类激情小说| 亚洲一级二级三级在线免费观看| 99久久精品免费看| 视频一区二区三区入口| www日韩大片| 在线免费观看成人短视频| 中文字幕精品一区| 欧美日韩精品一区二区三区四区 | 国产网站一区二区| 美女在线观看视频一区二区| 久久久www成人免费无遮挡大片| 蜜桃视频在线观看一区二区| 制服视频三区第一页精品| 亚洲成人免费影院| 久久亚洲一区二区三区四区| 99热这里都是精品| 美日韩一区二区| 亚洲精品国产无天堂网2021| 精品av综合导航| 色播五月激情综合网| 激情av综合网| 水蜜桃久久夜色精品一区的特点| 欧美日韩视频一区二区| 国产在线国偷精品免费看| 一个色在线综合| 欧美日韩免费一区二区三区| 国产精品123| 日韩国产欧美在线视频| 亚洲欧洲日韩av| 色噜噜偷拍精品综合在线| 国产中文一区二区三区| 亚瑟在线精品视频| 亚洲男同1069视频| 亚洲国产高清aⅴ视频| 成人精品亚洲人成在线| 蜜桃免费网站一区二区三区| 亚洲一级电影视频| 亚洲人成精品久久久久久| 精品国产乱码久久久久久影片| 精一区二区三区| 日韩av一区二区在线影视| 亚洲精品视频在线观看网站| 国产精品水嫩水嫩| 久久久亚洲综合| 精品欧美乱码久久久久久| 在线综合视频播放| 国产成人免费视频网站| 精东粉嫩av免费一区二区三区| 欧美激情一区二区在线| 精品盗摄一区二区三区| 欧美一区二区三区播放老司机| 国产一本一道久久香蕉| 韩国一区二区在线观看| 免费成人你懂的| 日本不卡的三区四区五区| 首页综合国产亚洲丝袜| 亚洲一卡二卡三卡四卡| 亚洲综合激情小说| 亚洲综合色区另类av| 亚洲一区在线观看免费| 亚洲激情图片qvod| 亚洲国产一二三| 午夜视频久久久久久| 性感美女久久精品| 美女一区二区在线观看| 蜜臂av日日欢夜夜爽一区| 亚洲四区在线观看| 一区二区三区免费看视频| 一级做a爱片久久| 午夜久久久久久久久| 蜜桃av一区二区三区| 精品一区二区三区在线播放| 国产激情偷乱视频一区二区三区| 亚洲国产sm捆绑调教视频 | 欧美亚洲一区二区在线| 欧美视频你懂的| 4438x亚洲最大成人网| 日韩欧美亚洲另类制服综合在线| 99久久精品国产导航| 蜜臀av一级做a爰片久久| 国产一区二区三区日韩| 成人精品免费看| 91视频在线观看| 69堂国产成人免费视频| 久久亚洲一区二区三区明星换脸| 欧美日韩不卡在线| 99精品久久久久久| 欧美猛男男办公室激情| 精品国产乱码久久久久久夜甘婷婷| 欧美色中文字幕| 97久久精品人人做人人爽50路 | 伊人色综合久久天天| 亚洲高清在线精品| 国产精品一区二区三区99| 日韩成人精品视频| 国产成人精品一区二| 日本高清不卡一区| 精品国内片67194| 一区二区视频在线看| 免费人成黄页网站在线一区二区| 亚洲国产视频直播| 国产精品亚洲综合一区在线观看| 久久超碰97中文字幕| 日韩av电影天堂| 国产成人精品一区二区三区网站观看| 久久99国产乱子伦精品免费| 99久久综合狠狠综合久久| 91精品在线观看入口| 中文一区一区三区高中清不卡| 国产区在线观看成人精品| 日本一区二区视频在线| 亚洲成av人影院| 日韩激情在线观看| av电影在线不卡| 精品少妇一区二区三区日产乱码| 日韩午夜激情电影| 亚洲精品中文在线观看| 国产精品一二三四| 7777精品伊人久久久大香线蕉最新版 | 国产欧美一区二区精品性色超碰| 久久久久久久久久久电影| 久久亚洲综合色一区二区三区| 久久―日本道色综合久久| 亚洲成人av电影在线| 国产91清纯白嫩初高中在线观看| 国产不卡一区视频| 欧美一区二区久久| 久久亚洲二区三区| 中文久久乱码一区二区| 久久精品久久综合| 91麻豆精品91久久久久同性| 精品国产乱码久久久久久1区2区| 国产视频亚洲色图| 免费av网站大全久久| 欧美视频一区在线| 2019国产精品| 蜜臀精品一区二区三区在线观看 | 日本久久精品电影| 中文字幕av一区二区三区免费看| 椎名由奈av一区二区三区| 国产成人免费av在线| 国产亚洲婷婷免费| 国产高清精品在线| 精品国产免费一区二区三区四区| 中文在线免费一区三区高中清不卡| 亚洲美女淫视频| 93久久精品日日躁夜夜躁欧美| 欧美日韩一区二区三区视频| 亚洲免费av高清| 色偷偷久久人人79超碰人人澡| 91精品国产综合久久久久久久久久| 欧美mv和日韩mv的网站| 韩国女主播成人在线观看| 日韩欧美国产综合一区| 韩国一区二区在线观看| 久久精品亚洲一区二区三区浴池 | 不卡欧美aaaaa| 亚洲国产毛片aaaaa无费看| 欧美片网站yy| 人人狠狠综合久久亚洲| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 日韩精品五月天| 日韩欧美不卡在线观看视频| 麻豆国产精品视频| 国产午夜亚洲精品不卡| 成人高清视频在线观看| 伊人婷婷欧美激情| 国产91精品精华液一区二区三区 | 26uuu亚洲| 亚洲影院在线观看| 成人国产一区二区三区精品| 欧美一区2区视频在线观看| 日本视频一区二区| 久久久久免费观看| av激情亚洲男人天堂| 亚洲成a人v欧美综合天堂| av爱爱亚洲一区| 亚洲一区中文日韩| 精品日韩欧美一区二区| 99国产精品久久久久久久久久| 久久综合久久综合九色| av电影天堂一区二区在线|