/*
* Copyright 2001-2009 Terracotta, Inc.
*
* 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.
*
*/
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.slf4j.Logger;
import org.slf4j.LoggerFactory;
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 final String LOCK_TRIGGER_ACCESS = "TRIGGER_ACCESS";
protected static final String LOCK_JOB_ACCESS = "JOB_ACCESS";
protected static final String LOCK_CALENDAR_ACCESS = "CALENDAR_ACCESS";
protected static final String LOCK_STATE_ACCESS = "STATE_ACCESS";
protected static final 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 schedSignaler;
protected int maxToRecoverAtATime = 20;
private boolean setTxIsolationLevelSequential = false;
private boolean acquireTriggersWithinLock = false;
private long dbRetryInterval = 10000;
private boolean makeThreadsDaemons = false;
private boolean threadsInheritInitializersClassLoadContext = false;
private ClassLoader initializersLoader = null;
private boolean doubleCheckLockMisfireHandler = true;
private final Logger log = LoggerFactory.getLogger(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;
}
public long getEstimatedTimeToReleaseAndAcquireTrigger() {
return 70;
}
/**
* <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) {
clusterCheckinInterval = l;
}
/**
* <p>
* Get the maximu
没有合适的资源?快使用搜索试试~ 我知道了~
spring定时器源码 quartz-1.8.4
5星 · 超过95%的资源 需积分: 20 59 下载量 118 浏览量
2010-12-30
11:38:59
上传
评论
收藏 2.64MB GZ 举报
温馨提示
共887个文件
html:498个
java:236个
xml:26个
spring定时器源码 quartz-1.8.4的最新版本源码,liunx和windows平台两用.Windows平台解压之后即可。
资源推荐
资源详情
资源评论
收起资源包目录
spring定时器源码 quartz-1.8.4 (887个子文件)
instance2.bat 1KB
instance1.bat 1KB
instance2.bat 880B
instance1.bat 866B
client.bat 760B
server.bat 760B
example11.bat 755B
example10.bat 753B
example2.bat 618B
example6.bat 617B
example3.bat 616B
example14.bat 614B
example7.bat 614B
example8.bat 613B
example9.bat 613B
example4.bat 613B
example5.bat 612B
example1.bat 611B
buildcp.bat 462B
start-sample-server.bat 399B
stop-sample-server.bat 398B
addpath.bat 23B
stylesheet.css 1KB
inherit.gif 57B
index-all.html 1.09MB
SchedulerException.html 363KB
StdJDBCDelegate.html 318KB
JobStoreSupport.html 299KB
constant-values.html 233KB
DriverDelegate.html 220KB
SchedulingContext.html 213KB
QuartzScheduler.html 182KB
Trigger.html 160KB
QuartzSchedulerMBeanImpl.html 159KB
RemoteMBeanScheduler.html 151KB
RemoteScheduler.html 143KB
JobPersistenceException.html 139KB
Scheduler.html 138KB
StdScheduler.html 132KB
RAMJobStore.html 122KB
RemotableQuartzScheduler.html 116KB
StdJDBCConstants.html 116KB
OracleDelegate.html 99KB
Trigger.html 96KB
JobStore.html 95KB
QuartzSchedulerMBean.html 91KB
JobDetail.html 90KB
StdSchedulerFactory.html 89KB
XMLSchedulingDataProcessor.html 89KB
CronTrigger.html 87KB
TriggerUtils.html 86KB
PointbaseDelegate.html 83KB
SimpleTrigger.html 82KB
Calendar.html 79KB
NthIncludedDayTrigger.html 76KB
package-use.html 72KB
DateIntervalTrigger.html 70KB
Constants.html 69KB
DB2v6Delegate.html 67KB
CronExpression.html 66KB
serialized-form.html 64KB
JobStoreCMT.html 63KB
PostgreSQLDelegate.html 62KB
WebLogicOracleDelegate.html 62KB
HSQLDBDelegate.html 62KB
WebLogicDelegate.html 62KB
MSSQLDelegate.html 61KB
DailyCalendar.html 61KB
DB2v7Delegate.html 59KB
QuartzSchedulerResources.html 59KB
CloudscapeDelegate.html 59KB
JobDataMap.html 57KB
DB2v8Delegate.html 56KB
overview-tree.html 55KB
JobStoreTX.html 55KB
JobExecutionContext.html 54KB
DBSemaphore.html 48KB
JobDetail.html 47KB
DirectSchedulerFactory.html 46KB
PropertiesParser.html 45KB
Scheduler.html 43KB
BroadcastSchedulerListener.html 43KB
SchedulerException.html 42KB
StdRowLockSemaphore.html 41KB
SchedulerListenerSupport.html 41KB
StringKeyDirtyFlagMap.html 41KB
UpdateLockRowSemaphore.html 40KB
JobDataMap.html 40KB
LoggingJobHistoryPlugin.html 38KB
LoggingTriggerHistoryPlugin.html 38KB
SampledRateCounterImpl.html 36KB
FilterAndBroadcastTriggerListener.html 35KB
SimpleThreadPool.html 35KB
BaseCalendar.html 35KB
DirtyFlagMap.html 35KB
JobExecutionContext.html 34KB
SampledStatisticsImpl.html 34KB
CronCalendar.html 34KB
JBoss4RMIRemoteMBeanScheduler.html 34KB
SendMailJob.html 33KB
共 887 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9
资源评论
- xsflying2012-12-09不错 是我想要的
chopin406
- 粉丝: 5
- 资源: 37
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 934742083249391XGOBOTV1.2.4.apk
- 课程设计基于OpenCV的材料缺陷检测程序python源码(含超详细注释).zip
- 基于python和百度EsayDL实现自动驾驶算法+基于ESP32开发板作为智能车主控芯片的自动驾驶智能车项目+源码(高分项目)
- Centos7-离线安装-MySQL5-7-31-tar包安装
- 蓝海平台带货-课程网盘链接提取码下载 .txt
- 基于Python实现了K-Means GMM DBSCAN AGNES等四种常见的聚类算法源码.zip
- 基于单通道脑电信号的自动睡眠分期研究.zip
- 课程大作业二手车价格预测案例数据挖掘python源码+数据集+实验报告+详细注释.zip
- 基于python+PyQt5开发的智能照明控制系统上位机软件源码.zip
- 汽车壁纸头像-课程网盘链接提取码下载 .txt
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功