/*
* 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.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Proxy;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.Calendar;
import org.quartz.CronTrigger;
import org.quartz.JobDataMap;
import org.quartz.JobDetail;
import org.quartz.JobPersistenceException;
import org.quartz.ObjectAlreadyExistsException;
import org.quartz.Scheduler;
import org.quartz.SchedulerConfigException;
import org.quartz.SchedulerException;
import org.quartz.SimpleTrigger;
import org.quartz.Trigger;
import org.quartz.core.SchedulingContext;
import org.quartz.spi.ClassLoadHelper;
import org.quartz.spi.JobStore;
import org.quartz.spi.SchedulerSignaler;
import org.quartz.spi.TriggerFiredBundle;
import org.quartz.utils.DBConnectionManager;
import org.quartz.utils.Key;
import org.quartz.utils.TriggerStatus;
/**
* <p>
* Contains base functionality for JDBC-based JobStore implementations.
* </p>
*
* @author <a href="mailto:jeff@binaryfeed.org">Jeffrey Wescott</a>
* @author James House
*/
public abstract class JobStoreSupport implements JobStore, Constants {
/*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
* Constants.
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
protected static String LOCK_TRIGGER_ACCESS = "TRIGGER_ACCESS";
protected static String LOCK_JOB_ACCESS = "JOB_ACCESS";
protected static String LOCK_CALENDAR_ACCESS = "CALENDAR_ACCESS";
protected static String LOCK_STATE_ACCESS = "STATE_ACCESS";
protected static String LOCK_MISFIRE_ACCESS = "MISFIRE_ACCESS";
/*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
* Data members.
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
protected String dsName;
protected String tablePrefix = DEFAULT_TABLE_PREFIX;
protected boolean useProperties = false;
protected String instanceId;
protected String instanceName;
protected String delegateClassName;
protected Class delegateClass = StdJDBCDelegate.class;
protected HashMap calendarCache = new HashMap();
private DriverDelegate delegate;
private long misfireThreshold = 60000L; // one minute
private boolean dontSetAutoCommitFalse = false;
private boolean isClustered = false;
private boolean useDBLocks = false;
private boolean lockOnInsert = true;
private Semaphore lockHandler = null; // set in initialize() method...
private String selectWithLockSQL = null;
private long clusterCheckinInterval = 7500L;
private ClusterManager clusterManagementThread = null;
private MisfireHandler misfireHandler = null;
private ClassLoadHelper classLoadHelper;
private SchedulerSignaler signaler;
protected int maxToRecoverAtATime = 20;
private boolean setTxIsolationLevelSequential = false;
private long dbRetryInterval = 10000;
private boolean makeThreadsDaemons = false;
private boolean doubleCheckLockMisfireHandler = true;
private final Log log = LogFactory.getLog(getClass());
/*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
* Interface.
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
/**
* <p>
* Set the name of the <code>DataSource</code> that should be used for
* performing database functions.
* </p>
*/
public void setDataSource(String dsName) {
this.dsName = dsName;
}
/**
* <p>
* Get the name of the <code>DataSource</code> that should be used for
* performing database functions.
* </p>
*/
public String getDataSource() {
return dsName;
}
/**
* <p>
* Set the prefix that should be pre-pended to all table names.
* </p>
*/
public void setTablePrefix(String prefix) {
if (prefix == null) {
prefix = "";
}
this.tablePrefix = prefix;
}
/**
* <p>
* Get the prefix that should be pre-pended to all table names.
* </p>
*/
public String getTablePrefix() {
return tablePrefix;
}
/**
* <p>
* Set whether String-only properties will be handled in JobDataMaps.
* </p>
*/
public void setUseProperties(String useProp) {
if (useProp == null) {
useProp = "false";
}
this.useProperties = Boolean.valueOf(useProp).booleanValue();
}
/**
* <p>
* Get whether String-only properties will be handled in JobDataMaps.
* </p>
*/
public boolean canUseProperties() {
return useProperties;
}
/**
* <p>
* Set the instance Id of the Scheduler (must be unique within a cluster).
* </p>
*/
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
/**
* <p>
* Get the instance Id of the Scheduler (must be unique within a cluster).
* </p>
*/
public String getInstanceId() {
return instanceId;
}
/**
* Set the instance name of the Scheduler (must be unique within this server instance).
*/
public void setInstanceName(String instanceName) {
this.instanceName = instanceName;
}
/**
* Get the instance name of the Scheduler (must be unique within this server instance).
*/
public String getInstanceName() {
return instanceName;
}
/**
* <p>
* Set whether this instance is part of a cluster.
* </p>
*/
public void setIsClustered(boolean isClustered) {
this.isClustered = isClustered;
}
/**
* <p>
* Get whether this instance is part of a cluster.
* </p>
*/
public boolean isClustered() {
return isClustered;
}
/**
* <p>
* Get the frequency (in milliseconds) at which this instance "checks-in"
* with the other instances of the cluster. -- Affects the rate of
* detecting failed instances.
* </p>
*/
public long getClusterCheckinInterval() {
return clusterCheckinInterval;
}
/**
* <p>
* Set the frequency (in milliseconds) at which this instance "checks-in"
* with the other instances of the cluster. -- Affects the rate of
* detecting failed instances.
* </p>
*/
public void setClusterCheckinInterval(long l) {
clusterCheckinInte
没有合适的资源?快使用搜索试试~ 我知道了~
quartz-1.6.0
共940个文件
html:538个
java:206个
gif:32个
5星 · 超过95%的资源 需积分: 9 101 下载量 119 浏览量
2007-12-11
07:53:17
上传
评论
收藏 4.95MB RAR 举报
温馨提示
Quartz是OpenSymphony开源组织在Job scheduling领域又一个开源项目,它可以与J2EE与J2SE应用程序相结合也可以单独使用。Quartz可以用来创建简单或为运行十个,百个,甚至是好几万个Jobs这样复杂的日程序表。Jobs可以做成标准的Java组件或 EJBs。Quartz的最新版本为Quartz 1.5.0。
资源推荐
资源详情
资源评论
收起资源包目录
quartz-1.6.0 (940个子文件)
checkstyle.ant 930B
instance2.bat 908B
instance1.bat 894B
server.bat 790B
client.bat 790B
example11.bat 785B
example10.bat 783B
buildcp.bat 768B
example2.bat 652B
example6.bat 651B
example3.bat 650B
example14.bat 648B
example7.bat 648B
example9.bat 647B
example8.bat 647B
example4.bat 647B
example5.bat 646B
example1.bat 645B
addpath.bat 23B
site.css 27KB
stylesheet.css 1KB
job_scheduling_data_1_5.dtd 6KB
job_scheduling_data_1_5.dtd 6KB
user_16.gif 1008B
information.gif 1005B
smile.gif 699B
wink.gif 698B
sad.gif 698B
tongue.gif 698B
biggrin.gif 696B
help_16.gif 634B
error.gif 633B
forbidden.gif 613B
check.gif 604B
add.gif 599B
home_16.gif 594B
warning.gif 569B
star_green.gif 569B
star_blue.gif 569B
star_yellow.gif 567B
star_red.gif 567B
lightbulb_on.gif 551B
user_12.gif 528B
mail_16.gif 381B
lightbulb.gif 350B
thumbs_down.gif 283B
thumbs_up.gif 280B
blogentry_16.gif 268B
mail_small.gif 202B
comment_16.gif 178B
linkext7.gif 166B
border_bottom.gif 117B
bullet_blue.gif 60B
inherit.gif 57B
spacer.gif 43B
index-all.html 996KB
SchedulerException.html 306KB
JobStoreSupport.html 286KB
StdJDBCDelegate.html 282KB
constant-values.html 235KB
SchedulingContext.html 209KB
QuartzScheduler.html 177KB
Trigger.html 153KB
RemoteMBeanScheduler.html 151KB
RemoteScheduler.html 143KB
Scheduler.html 137KB
JobPersistenceException.html 136KB
StdScheduler.html 131KB
Quartz 1.6.0.html 127KB
JobSchedulingDataProcessor.html 116KB
RAMJobStore.html 115KB
StdJDBCConstants.html 113KB
RemotableQuartzScheduler.html 111KB
OracleDelegate.html 95KB
JobStore.html 91KB
Trigger.html 91KB
Calendar.html 85KB
TriggerUtils.html 83KB
StdSchedulerFactory.html 82KB
CronTrigger.html 80KB
PointbaseDelegate.html 79KB
SimpleTrigger.html 75KB
JobDetail.html 73KB
NthIncludedDayTrigger.html 73KB
DailyCalendar.html 72KB
package-use.html 70KB
Constants.html 66KB
DB2v6Delegate.html 66KB
TriggerUtils.html 66KB
CronExpression.html 64KB
JobStoreCMT.html 61KB
WebLogicOracleDelegate.html 61KB
PostgreSQLDelegate.html 61KB
WebLogicDelegate.html 61KB
HSQLDBDelegate.html 61KB
MSSQLDelegate.html 61KB
DB2v7Delegate.html 59KB
CloudscapeDelegate.html 58KB
Quartz 1.5.0.html 58KB
serialized-form.html 56KB
共 940 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
资源评论
- xuneng12015-12-17好难找的资源,多谢了!
- mausmars2014-05-04谢谢楼主,很好用。
- lyf80802015-05-25很好用,解决大问题了,谢谢搂主.
- ly2718838392016-05-05谢谢楼主,很好用。
showcup
- 粉丝: 3
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 杨辉三角(Pascal's Triangle)是一个在数学中非常著名的数列,它以一种特定的模式排列数字,内容以5种代码实例实现
- yolov5数据集:CT图像肾脏、结石检测(2类别,包含训练集、验证集)
- 电力102规约请求报文实录
- RTL8723 linux+安卓驱动 2020版本
- ISO 26262 道路车辆-功能安全-系统级产品开发
- 数据挖掘期末题 选择填空简答
- EKF在CTRV模型上的建模推导
- 用于:https://laoshifu.blog.csdn.net/article/details/138191428 多层创建
- 电力102规约(电能累计量的传输规约)培训
- 「常用」E9外部流程接口
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功