/*
* 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 threadsInheritInitializersClassLoadContext = false;
private ClassLoader initializersLoader = null;
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
* det
没有合适的资源?快使用搜索试试~ 我知道了~
Quartz相关架包及api等资源文件
共994个文件
html:542个
java:220个
gif:32个
4星 · 超过85%的资源 需积分: 9 79 下载量 92 浏览量
2012-02-22
11:52:14
上传
评论 1
收藏 5.41MB ZIP 举报
温馨提示
Quartz相关架包及api等资源文件,包含quartz-1.6.2.jar、quartz-all-1.6.2.jar、quartz-jboss-1.6.2.jar、quartz-oracle-1.6.2.jar、quartz-weblogic-1.6.2.jar
资源推荐
资源详情
资源评论
收起资源包目录
Quartz相关架包及api等资源文件 (994个子文件)
checkstyle.ant 930B
JobSchedulingDataProcessor.java.bak 51KB
site.css.bak 27KB
JobInitializationPlugin.java.bak 17KB
CascadingClassLoadHelper.java.bak 6KB
FileScanJob.java.bak 4KB
SimpleClassLoadHelper.java.bak 3KB
InitThreadContextClassLoadHelper.java.bak 3KB
ThreadContextClassLoadHelper.java.bak 3KB
LoadingLoaderClassLoadHelper.java.bak 3KB
ClassLoadHelper.java.bak 2KB
buildcp.bat 1KB
instance2.bat 935B
instance1.bat 921B
client.bat 814B
server.bat 814B
example11.bat 809B
example10.bat 807B
example2.bat 674B
example6.bat 673B
example3.bat 672B
example14.bat 670B
example7.bat 670B
example4.bat 669B
example8.bat 669B
example9.bat 669B
example5.bat 668B
example1.bat 667B
addpath.bat 23B
site.css 30KB
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
tongue.gif 698B
sad.gif 698B
wink.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
star_blue.gif 569B
star_green.gif 569B
warning.gif 569B
star_red.gif 567B
star_yellow.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 1013KB
SchedulerException.html 310KB
JobStoreSupport.html 289KB
StdJDBCDelegate.html 270KB
constant-values.html 236KB
SchedulingContext.html 210KB
QuartzScheduler.html 179KB
Trigger.html 154KB
RemoteMBeanScheduler.html 153KB
RemoteScheduler.html 145KB
Quartz 1.6.0.html 144KB
Scheduler.html 138KB
JobPersistenceException.html 137KB
StdScheduler.html 133KB
JobSchedulingDataProcessor.html 120KB
RAMJobStore.html 116KB
StdJDBCConstants.html 114KB
RemotableQuartzScheduler.html 112KB
OracleDelegate.html 95KB
Trigger.html 93KB
Quartz 1.6.1.html 92KB
JobStore.html 91KB
Calendar.html 86KB
CronTrigger.html 84KB
StdSchedulerFactory.html 84KB
TriggerUtils.html 83KB
DailyCalendar.html 80KB
PointbaseDelegate.html 79KB
SimpleTrigger.html 76KB
JobDetail.html 74KB
NthIncludedDayTrigger.html 74KB
package-use.html 70KB
Constants.html 68KB
TriggerUtils.html 66KB
DB2v6Delegate.html 65KB
共 994 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
nowgowin
- 粉丝: 12
- 资源: 18
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页