|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.quartz.impl.jdbcjobstore.JobStoreSupport
public abstract class JobStoreSupport
Contains base functionality for JDBC-based JobStore implementations.
Nested Class Summary | |
---|---|
protected static class |
JobStoreSupport.RecoverMisfiredJobsResult
Helper class for returning the composite result of trying to recover misfired jobs. |
protected static interface |
JobStoreSupport.TransactionCallback
Implement this interface to provide the code to execute within the a transaction template. |
protected static interface |
JobStoreSupport.VoidTransactionCallback
Implement this interface to provide the code to execute within the a transaction template that has no return value. |
Field Summary | |
---|---|
protected HashMap<String,Calendar> |
calendarCache
|
protected Class<? extends DriverDelegate> |
delegateClass
|
protected String |
delegateClassName
|
protected String |
delegateInitString
|
protected String |
dsName
|
protected boolean |
firstCheckIn
|
protected String |
instanceId
|
protected String |
instanceName
|
protected long |
lastCheckin
|
protected static String |
LOCK_CALENDAR_ACCESS
|
protected static String |
LOCK_JOB_ACCESS
|
protected static String |
LOCK_MISFIRE_ACCESS
|
protected static String |
LOCK_STATE_ACCESS
|
protected static String |
LOCK_TRIGGER_ACCESS
|
protected int |
maxToRecoverAtATime
|
protected ThreadLocal<Long> |
sigChangeForTxCompletion
|
protected String |
tablePrefix
|
protected boolean |
useProperties
|
Constructor Summary | |
---|---|
JobStoreSupport()
|
Method Summary | |
---|---|
protected List<org.quartz.spi.OperableTrigger> |
acquireNextTrigger(Connection conn,
long noLaterThan,
int maxCount,
long timeWindow)
|
List<org.quartz.spi.OperableTrigger> |
acquireNextTriggers(long noLaterThan,
int maxCount,
long timeWindow)
Get a handle to the next N triggers to be fired, and mark them as 'reserved' by the calling scheduler. |
protected long |
calcFailedIfAfter(SchedulerStateRecord rec)
|
protected boolean |
calendarExists(Connection conn,
String calName)
|
boolean |
canUseProperties()
Get whether String-only properties will be handled in JobDataMaps. |
protected String |
checkBlockedState(Connection conn,
JobKey jobKey,
String currentState)
Determines if a Trigger for the given job should be blocked. |
protected boolean |
checkExists(Connection conn,
JobKey jobKey)
|
protected boolean |
checkExists(Connection conn,
TriggerKey triggerKey)
|
boolean |
checkExists(JobKey jobKey)
Determine whether a Job with the given identifier already
exists within the scheduler. |
boolean |
checkExists(TriggerKey triggerKey)
Determine whether a Trigger with the given identifier already
exists within the scheduler. |
protected void |
cleanupConnection(Connection conn)
Cleanup the given database connection. |
void |
clearAllSchedulingData()
Clear (delete!) all scheduling data - all Job s, Trigger s
Calendar s. |
protected void |
clearAllSchedulingData(Connection conn)
|
protected Long |
clearAndGetSignalSchedulingChangeOnTxCompletion()
|
protected void |
closeConnection(Connection conn)
Closes the supplied Connection . |
protected List<SchedulerStateRecord> |
clusterCheckIn(Connection conn)
|
protected void |
clusterRecover(Connection conn,
List<SchedulerStateRecord> failedInstances)
|
protected void |
commitConnection(Connection conn)
Commit the supplied connection |
protected boolean |
doCheckin()
|
protected JobStoreSupport.RecoverMisfiredJobsResult |
doRecoverMisfires()
|
protected abstract Object |
executeInLock(String lockName,
JobStoreSupport.TransactionCallback txCallback)
Execute the given callback having acquired the given lock. |
protected void |
executeInLock(String lockName,
JobStoreSupport.VoidTransactionCallback txCallback)
Execute the given callback having acquired the given lock. |
protected Object |
executeInNonManagedTXLock(String lockName,
JobStoreSupport.TransactionCallback txCallback)
Execute the given callback having optionally acquired the given lock. |
protected void |
executeInNonManagedTXLock(String lockName,
JobStoreSupport.VoidTransactionCallback txCallback)
Execute the given callback having optionally acquired the given lock. |
Object |
executeWithoutLock(JobStoreSupport.TransactionCallback txCallback)
Execute the given callback in a transaction. |
protected List<SchedulerStateRecord> |
findFailedInstances(Connection conn)
Get a list of all scheduler instances in the cluster that may have failed. |
protected Connection |
getAttributeRestoringConnection(Connection conn)
Wrap the given Connection in a Proxy such that attributes
that might be set will be restored before the connection is closed
(and potentially restored to a pool). |
List<String> |
getCalendarNames()
Get the names of all of the s
in the JobStore . |
protected List<String> |
getCalendarNames(Connection conn)
|
protected org.quartz.spi.ClassLoadHelper |
getClassLoadHelper()
|
long |
getClusterCheckinInterval()
Get the frequency (in milliseconds) at which this instance "checks-in" with the other instances of the cluster. |
protected Connection |
getConnection()
|
String |
getDataSource()
Get the name of the DataSource that should be used for
performing database functions. |
long |
getDbRetryInterval()
|
protected DriverDelegate |
getDelegate()
Get the driver delegate for DB operations. |
boolean |
getDoubleCheckLockMisfireHandler()
Get whether to check to see if there are Triggers that have misfired before actually acquiring the lock to recover them. |
String |
getDriverDelegateClass()
Get the JDBC driver delegate class name. |
String |
getDriverDelegateInitString()
Get the JDBC driver delegate's initialization string. |
long |
getEstimatedTimeToReleaseAndAcquireTrigger()
|
protected String |
getFiredTriggerRecordId()
|
String |
getInstanceId()
Get the instance Id of the Scheduler (must be unique within a cluster). |
String |
getInstanceName()
Get the instance name of the Scheduler (must be unique within this server instance). |
List<String> |
getJobGroupNames()
Get the names of all of the
groups. |
protected List<String> |
getJobGroupNames(Connection conn)
|
Set<JobKey> |
getJobKeys(GroupMatcher<JobKey> matcher)
Get the names of all of the s that
matcher the given groupMatcher. |
protected Set<JobKey> |
getJobNames(Connection conn,
GroupMatcher<JobKey> matcher)
|
protected Semaphore |
getLockHandler()
|
protected org.slf4j.Logger |
getLog()
|
boolean |
getMakeThreadsDaemons()
Get whether the threads spawned by this JobStore should be marked as daemon. |
int |
getMaxMisfiresToHandleAtATime()
Get the maximum number of misfired triggers that the misfire handling thread will try to recover at one time (within one transaction). |
long |
getMisfireThreshold()
|
protected long |
getMisfireTime()
|
protected abstract Connection |
getNonManagedTXConnection()
|
int |
getNumberOfCalendars()
Get the number of s that are
stored in the JobsStore . |
protected int |
getNumberOfCalendars(Connection conn)
|
int |
getNumberOfJobs()
Get the number of s that are
stored in the JobStore . |
protected int |
getNumberOfJobs(Connection conn)
|
int |
getNumberOfTriggers()
Get the number of s that are
stored in the JobsStore . |
protected int |
getNumberOfTriggers(Connection conn)
|
Set<String> |
getPausedTriggerGroups()
|
Set<String> |
getPausedTriggerGroups(Connection conn)
Pause all of the in the
given group. |
String |
getSelectWithLockSQL()
|
String |
getTablePrefix()
Get the prefix that should be pre-pended to all table names. |
org.quartz.spi.ThreadExecutor |
getThreadExecutor()
|
List<String> |
getTriggerGroupNames()
Get the names of all of the
groups. |
protected List<String> |
getTriggerGroupNames(Connection conn)
|
Set<TriggerKey> |
getTriggerKeys(GroupMatcher<TriggerKey> matcher)
Get the names of all of the s
that match the given group Matcher. |
protected Set<TriggerKey> |
getTriggerNames(Connection conn,
GroupMatcher<TriggerKey> matcher)
|
protected List<org.quartz.spi.OperableTrigger> |
getTriggersForJob(Connection conn,
JobKey key)
|
List<org.quartz.spi.OperableTrigger> |
getTriggersForJob(JobKey jobKey)
Get all of the Triggers that are associated to the given Job. |
Trigger.TriggerState |
getTriggerState(Connection conn,
TriggerKey key)
|
Trigger.TriggerState |
getTriggerState(TriggerKey triggerKey)
Get the current state of the identified . |
boolean |
getUseDBLocks()
Get whether this instance should use database-based thread synchronization. |
void |
initialize(org.quartz.spi.ClassLoadHelper loadHelper,
org.quartz.spi.SchedulerSignaler signaler)
Called by the QuartzScheduler before the JobStore is
used, in order to give it a chance to initialize. |
boolean |
isAcquireTriggersWithinLock()
Whether or not the query and update to acquire a Trigger for firing should be performed after obtaining an explicit DB lock (to avoid possible race conditions on the trigger's db row). |
boolean |
isClustered()
Get whether this instance is part of a cluster. |
boolean |
isDontSetAutoCommitFalse()
|
boolean |
isLockOnInsert()
|
boolean |
isThreadsInheritInitializersClassLoadContext()
Get whether to set the class load context of spawned threads to that of the initializing thread. |
boolean |
isTxIsolationLevelSerializable()
|
protected boolean |
jobExists(Connection conn,
JobKey jobKey)
Check existence of a given job. |
protected void |
logWarnIfNonZero(int val,
String warning)
|
void |
pauseAll()
Pause all triggers - equivalent of calling pauseTriggerGroup(group)
on every group. |
void |
pauseAll(Connection conn)
Pause all triggers - equivalent of calling pauseTriggerGroup(group)
on every group. |
void |
pauseJob(JobKey jobKey)
Pause the with the given name - by
pausing all of its current Trigger s. |
Set<String> |
pauseJobs(GroupMatcher<JobKey> matcher)
Pause all of the matching the given
groupMatcher - by pausing all of their Trigger s. |
void |
pauseTrigger(Connection conn,
TriggerKey triggerKey)
Pause the with the given name. |
void |
pauseTrigger(TriggerKey triggerKey)
Pause the with the given name. |
Set<String> |
pauseTriggerGroup(Connection conn,
GroupMatcher<TriggerKey> matcher)
Pause all of the matching the
given groupMatcher. |
Set<String> |
pauseTriggers(GroupMatcher<TriggerKey> matcher)
Pause all of the matching the
given groupMatcher. |
protected void |
recoverJobs()
Recover any failed or misfired jobs and clean up the data store as appropriate. |
protected void |
recoverJobs(Connection conn)
Will recover any failed or misfired jobs and clean up the data store as appropriate. |
protected JobStoreSupport.RecoverMisfiredJobsResult |
recoverMisfiredJobs(Connection conn,
boolean recovering)
|
protected void |
releaseAcquiredTrigger(Connection conn,
org.quartz.spi.OperableTrigger trigger)
|
void |
releaseAcquiredTrigger(org.quartz.spi.OperableTrigger trigger)
Inform the JobStore that the scheduler no longer plans to
fire the given Trigger , that it had previously acquired
(reserved). |
protected void |
releaseLock(Connection conn,
String lockName,
boolean doIt)
|
protected boolean |
removeCalendar(Connection conn,
String calName)
|
boolean |
removeCalendar(String calName)
Remove (delete) the with the
given name. |
protected boolean |
removeJob(Connection conn,
JobKey jobKey,
boolean activeDeleteSafe)
|
boolean |
removeJob(JobKey jobKey)
Remove (delete) the with the given
name, and any s that reference
it. |
boolean |
removeJobs(List<JobKey> jobKeys)
|
protected boolean |
removeTrigger(Connection conn,
TriggerKey key)
|
boolean |
removeTrigger(TriggerKey triggerKey)
Remove (delete) the with the
given name. |
boolean |
removeTriggers(List<TriggerKey> triggerKeys)
|
protected boolean |
replaceTrigger(Connection conn,
TriggerKey key,
org.quartz.spi.OperableTrigger newTrigger)
|
boolean |
replaceTrigger(TriggerKey triggerKey,
org.quartz.spi.OperableTrigger newTrigger)
|
void |
resumeAll()
Resume (un-pause) all triggers - equivalent of calling resumeTriggerGroup(group)
on every group. |
void |
resumeAll(Connection conn)
protected |
void |
resumeJob(JobKey jobKey)
Resume (un-pause) the with the
given name. |
Set<String> |
resumeJobs(GroupMatcher<JobKey> matcher)
Resume (un-pause) all of the in
the given group. |
void |
resumeTrigger(Connection conn,
TriggerKey key)
Resume (un-pause) the with the
given name. |
void |
resumeTrigger(TriggerKey triggerKey)
Resume (un-pause) the with the
given name. |
Set<String> |
resumeTriggerGroup(Connection conn,
GroupMatcher<TriggerKey> matcher)
Resume (un-pause) all of the
matching the given groupMatcher. |
Set<String> |
resumeTriggers(GroupMatcher<TriggerKey> matcher)
Resume (un-pause) all of the
matching the given groupMatcher. |
protected Calendar |
retrieveCalendar(Connection conn,
String calName)
|
Calendar |
retrieveCalendar(String calName)
Retrieve the given . |
protected JobDetail |
retrieveJob(Connection conn,
JobKey key)
|
JobDetail |
retrieveJob(JobKey jobKey)
Retrieve the for the given
. |
protected org.quartz.spi.OperableTrigger |
retrieveTrigger(Connection conn,
TriggerKey key)
|
org.quartz.spi.OperableTrigger |
retrieveTrigger(TriggerKey triggerKey)
Retrieve the given . |
protected void |
rollbackConnection(Connection conn)
Rollback the supplied connection. |
void |
schedulerPaused()
|
void |
schedulerResumed()
|
void |
schedulerStarted()
|
void |
setAcquireTriggersWithinLock(boolean acquireTriggersWithinLock)
Whether or not the query and update to acquire a Trigger for firing should be performed after obtaining an explicit DB lock. |
void |
setClusterCheckinInterval(long l)
Set the frequency (in milliseconds) at which this instance "checks-in" with the other instances of the cluster. |
void |
setDataSource(String dsName)
Set the name of the DataSource that should be used for
performing database functions. |
void |
setDbRetryInterval(long dbRetryInterval)
|
void |
setDontSetAutoCommitFalse(boolean b)
Don't call set autocommit(false) on connections obtained from the DataSource. |
void |
setDoubleCheckLockMisfireHandler(boolean doubleCheckLockMisfireHandler)
Set whether to check to see if there are Triggers that have misfired before actually acquiring the lock to recover them. |
void |
setDriverDelegateClass(String delegateClassName)
Set the JDBC driver delegate class. |
void |
setDriverDelegateInitString(String delegateInitString)
Set the JDBC driver delegate's initialization string. |
void |
setInstanceId(String instanceId)
Set the instance Id of the Scheduler (must be unique within a cluster). |
void |
setInstanceName(String instanceName)
Set the instance name of the Scheduler (must be unique within this server instance). |
void |
setIsClustered(boolean isClustered)
Set whether this instance is part of a cluster. |
void |
setLockHandler(Semaphore lockHandler)
|
void |
setLockOnInsert(boolean lockOnInsert)
Whether or not to obtain locks when inserting new jobs/triggers. |
void |
setMakeThreadsDaemons(boolean makeThreadsDaemons)
Set whether the threads spawned by this JobStore should be marked as daemon. |
void |
setMaxMisfiresToHandleAtATime(int maxToRecoverAtATime)
Set the maximum number of misfired triggers that the misfire handling thread will try to recover at one time (within one transaction). |
void |
setMisfireThreshold(long misfireThreshold)
The the number of milliseconds by which a trigger must have missed its next-fire-time, in order for it to be considered "misfired" and thus have its misfire instruction applied. |
void |
setSelectWithLockSQL(String string)
set the SQL statement to use to select and lock a row in the "locks" table. |
void |
setTablePrefix(String prefix)
Set the prefix that should be pre-pended to all table names. |
void |
setThreadExecutor(org.quartz.spi.ThreadExecutor threadExecutor)
|
void |
setThreadPoolSize(int poolSize)
|
void |
setThreadsInheritInitializersClassLoadContext(boolean threadsInheritInitializersClassLoadContext)
Set whether to set the class load context of spawned threads to that of the initializing thread. |
void |
setTxIsolationLevelSerializable(boolean b)
Set the transaction isolation level of DB connections to sequential. |
void |
setUseDBLocks(boolean useDBLocks)
Set whether this instance should use database-based thread synchronization. |
void |
setUseProperties(String useProp)
Set whether String-only properties will be handled in JobDataMaps. |
void |
shutdown()
Called by the QuartzScheduler to inform the JobStore that
it should free up all of it's resources because the scheduler is
shutting down. |
protected void |
signalSchedulingChangeImmediately(long candidateNewNextFireTime)
|
protected void |
signalSchedulingChangeOnTxCompletion(long candidateNewNextFireTime)
|
protected void |
storeCalendar(Connection conn,
String calName,
Calendar calendar,
boolean replaceExisting,
boolean updateTriggers)
|
void |
storeCalendar(String calName,
Calendar calendar,
boolean replaceExisting,
boolean updateTriggers)
Store the given . |
protected void |
storeJob(Connection conn,
JobDetail newJob,
boolean replaceExisting)
Insert or update a job. |
void |
storeJob(JobDetail newJob,
boolean replaceExisting)
Store the given . |
void |
storeJobAndTrigger(JobDetail newJob,
org.quartz.spi.OperableTrigger newTrigger)
Store the given and . |
void |
storeJobsAndTriggers(Map<JobDetail,List<Trigger>> triggersAndJobs,
boolean replace)
|
protected void |
storeTrigger(Connection conn,
org.quartz.spi.OperableTrigger newTrigger,
JobDetail job,
boolean replaceExisting,
String state,
boolean forceState,
boolean recovering)
Insert or update a trigger. |
void |
storeTrigger(org.quartz.spi.OperableTrigger newTrigger,
boolean replaceExisting)
Store the given . |
boolean |
supportsPersistence()
|
protected void |
triggeredJobComplete(Connection conn,
org.quartz.spi.OperableTrigger trigger,
JobDetail jobDetail,
Trigger.CompletedExecutionInstruction triggerInstCode)
|
void |
triggeredJobComplete(org.quartz.spi.OperableTrigger trigger,
JobDetail jobDetail,
Trigger.CompletedExecutionInstruction triggerInstCode)
Inform the JobStore that the scheduler has completed the
firing of the given Trigger (and the execution its
associated Job ), and that the
in the given JobDetail should be updated if the Job
is stateful. |
protected boolean |
triggerExists(Connection conn,
TriggerKey key)
Check existence of a given trigger. |
protected org.quartz.spi.TriggerFiredBundle |
triggerFired(Connection conn,
org.quartz.spi.OperableTrigger trigger)
|
List<org.quartz.spi.TriggerFiredResult> |
triggersFired(List<org.quartz.spi.OperableTrigger> triggers)
Inform the JobStore that the scheduler is now firing the
given Trigger (executing its associated Job ),
that it had previously acquired (reserved). |
protected boolean |
updateMisfiredTrigger(Connection conn,
TriggerKey triggerKey,
String newStateIfNotComplete,
boolean forceState)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String LOCK_TRIGGER_ACCESS
protected static final String LOCK_JOB_ACCESS
protected static final String LOCK_CALENDAR_ACCESS
protected static final String LOCK_STATE_ACCESS
protected static final String LOCK_MISFIRE_ACCESS
protected String dsName
protected String tablePrefix
protected boolean useProperties
protected String instanceId
protected String instanceName
protected String delegateClassName
protected String delegateInitString
protected Class<? extends DriverDelegate> delegateClass
protected HashMap<String,Calendar> calendarCache
protected int maxToRecoverAtATime
protected ThreadLocal<Long> sigChangeForTxCompletion
protected boolean firstCheckIn
protected long lastCheckin
Constructor Detail |
---|
public JobStoreSupport()
Method Detail |
---|
public void setDataSource(String dsName)
Set the name of the DataSource
that should be used for
performing database functions.
public String getDataSource()
Get the name of the DataSource
that should be used for
performing database functions.
public void setTablePrefix(String prefix)
Set the prefix that should be pre-pended to all table names.
public String getTablePrefix()
Get the prefix that should be pre-pended to all table names.
public void setUseProperties(String useProp)
Set whether String-only properties will be handled in JobDataMaps.
public boolean canUseProperties()
Get whether String-only properties will be handled in JobDataMaps.
public void setInstanceId(String instanceId)
Set the instance Id of the Scheduler (must be unique within a cluster).
setInstanceId
in interface org.quartz.spi.JobStore
public String getInstanceId()
Get the instance Id of the Scheduler (must be unique within a cluster).
public void setInstanceName(String instanceName)
setInstanceName
in interface org.quartz.spi.JobStore
public void setThreadPoolSize(int poolSize)
setThreadPoolSize
in interface org.quartz.spi.JobStore
public void setThreadExecutor(org.quartz.spi.ThreadExecutor threadExecutor)
public org.quartz.spi.ThreadExecutor getThreadExecutor()
public String getInstanceName()
public long getEstimatedTimeToReleaseAndAcquireTrigger()
getEstimatedTimeToReleaseAndAcquireTrigger
in interface org.quartz.spi.JobStore
public void setIsClustered(boolean isClustered)
Set whether this instance is part of a cluster.
public boolean isClustered()
Get whether this instance is part of a cluster.
isClustered
in interface org.quartz.spi.JobStore
public long getClusterCheckinInterval()
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.
public void setClusterCheckinInterval(long l)
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.
public int getMaxMisfiresToHandleAtATime()
Get the maximum number of misfired triggers that the misfire handling thread will try to recover at one time (within one transaction). The default is 20.
public void setMaxMisfiresToHandleAtATime(int maxToRecoverAtATime)
Set the maximum number of misfired triggers that the misfire handling thread will try to recover at one time (within one transaction). The default is 20.
public long getDbRetryInterval()
public void setDbRetryInterval(long dbRetryInterval)
dbRetryInterval
- The dbRetryInterval to set.public void setUseDBLocks(boolean useDBLocks)
Set whether this instance should use database-based thread synchronization.
public boolean getUseDBLocks()
Get whether this instance should use database-based thread synchronization.
public boolean isLockOnInsert()
public void setLockOnInsert(boolean lockOnInsert)
true
, which is safest - some db's (such as
MS SQLServer) seem to require this to avoid deadlocks under high load,
while others seem to do fine without.
Setting this property to false
will provide a
significant performance increase during the addition of new jobs
and triggers.
lockOnInsert
- public long getMisfireThreshold()
public void setMisfireThreshold(long misfireThreshold)
misfireThreshold
- public boolean isDontSetAutoCommitFalse()
public void setDontSetAutoCommitFalse(boolean b)
b
- public boolean isTxIsolationLevelSerializable()
public void setTxIsolationLevelSerializable(boolean b)
b
- public boolean isAcquireTriggersWithinLock()
public void setAcquireTriggersWithinLock(boolean acquireTriggersWithinLock)
public void setDriverDelegateClass(String delegateClassName) throws InvalidConfigurationException
Set the JDBC driver delegate class.
delegateClassName
- the delegate class name
InvalidConfigurationException
public String getDriverDelegateClass()
Get the JDBC driver delegate class name.
public void setDriverDelegateInitString(String delegateInitString) throws InvalidConfigurationException
Set the JDBC driver delegate's initialization string.
delegateInitString
- the delegate init string
InvalidConfigurationException
public String getDriverDelegateInitString()
Get the JDBC driver delegate's initialization string.
public String getSelectWithLockSQL()
public void setSelectWithLockSQL(String string)
set the SQL statement to use to select and lock a row in the "locks" table.
StdRowLockSemaphore
protected org.quartz.spi.ClassLoadHelper getClassLoadHelper()
public boolean getMakeThreadsDaemons()
MisfireHandler
and the ClusterManager
.
Thread.setDaemon(boolean)
public void setMakeThreadsDaemons(boolean makeThreadsDaemons)
MisfireHandler
and the ClusterManager
.
Thread.setDaemon(boolean)
public boolean isThreadsInheritInitializersClassLoadContext()
public void setThreadsInheritInitializersClassLoadContext(boolean threadsInheritInitializersClassLoadContext)
public boolean getDoubleCheckLockMisfireHandler()
public void setDoubleCheckLockMisfireHandler(boolean doubleCheckLockMisfireHandler)
protected org.slf4j.Logger getLog()
public void initialize(org.quartz.spi.ClassLoadHelper loadHelper, org.quartz.spi.SchedulerSignaler signaler) throws SchedulerConfigException
Called by the QuartzScheduler before the JobStore
is
used, in order to give it a chance to initialize.
initialize
in interface org.quartz.spi.JobStore
SchedulerConfigException
public void schedulerStarted() throws SchedulerException
schedulerStarted
in interface org.quartz.spi.JobStore
SchedulerException
JobStore.schedulerStarted()
public void schedulerPaused()
schedulerPaused
in interface org.quartz.spi.JobStore
public void schedulerResumed()
schedulerResumed
in interface org.quartz.spi.JobStore
public void shutdown()
Called by the QuartzScheduler to inform the JobStore
that
it should free up all of it's resources because the scheduler is
shutting down.
shutdown
in interface org.quartz.spi.JobStore
public boolean supportsPersistence()
supportsPersistence
in interface org.quartz.spi.JobStore
protected abstract Connection getNonManagedTXConnection() throws JobPersistenceException
JobPersistenceException
protected Connection getAttributeRestoringConnection(Connection conn)
Connection
in a Proxy such that attributes
that might be set will be restored before the connection is closed
(and potentially restored to a pool).
protected Connection getConnection() throws JobPersistenceException
JobPersistenceException
protected void releaseLock(Connection conn, String lockName, boolean doIt)
protected void recoverJobs() throws JobPersistenceException
JobPersistenceException
- if jobs could not be recoveredprotected void recoverJobs(Connection conn) throws JobPersistenceException
Will recover any failed or misfired jobs and clean up the data store as appropriate.
JobPersistenceException
- if jobs could not be recoveredprotected long getMisfireTime()
protected JobStoreSupport.RecoverMisfiredJobsResult recoverMisfiredJobs(Connection conn, boolean recovering) throws JobPersistenceException, SQLException
JobPersistenceException
SQLException
protected boolean updateMisfiredTrigger(Connection conn, TriggerKey triggerKey, String newStateIfNotComplete, boolean forceState) throws JobPersistenceException
JobPersistenceException
public void storeJobAndTrigger(JobDetail newJob, org.quartz.spi.OperableTrigger newTrigger) throws ObjectAlreadyExistsException, JobPersistenceException
Store the given
and JobDetail
.
Trigger
storeJobAndTrigger
in interface org.quartz.spi.JobStore
newJob
- The JobDetail
to be stored.newTrigger
- The Trigger
to be stored.
ObjectAlreadyExistsException
- if a Job
with the same name/group already
exists.
JobPersistenceException
public void storeJob(JobDetail newJob, boolean replaceExisting) throws ObjectAlreadyExistsException, JobPersistenceException
Store the given
.
JobDetail
storeJob
in interface org.quartz.spi.JobStore
newJob
- The JobDetail
to be stored.replaceExisting
- If true
, any Job
existing in the
JobStore
with the same name & group should be
over-written.
ObjectAlreadyExistsException
- if a Job
with the same name/group already
exists, and replaceExisting is set to false.
JobPersistenceException
protected void storeJob(Connection conn, JobDetail newJob, boolean replaceExisting) throws ObjectAlreadyExistsException, JobPersistenceException
Insert or update a job.
ObjectAlreadyExistsException
JobPersistenceException
protected boolean jobExists(Connection conn, JobKey jobKey) throws JobPersistenceException
Check existence of a given job.
JobPersistenceException
public void storeTrigger(org.quartz.spi.OperableTrigger newTrigger, boolean replaceExisting) throws ObjectAlreadyExistsException, JobPersistenceException
Store the given
.
Trigger
storeTrigger
in interface org.quartz.spi.JobStore
newTrigger
- The Trigger
to be stored.replaceExisting
- If true
, any Trigger
existing in
the JobStore
with the same name & group should
be over-written.
ObjectAlreadyExistsException
- if a Trigger
with the same name/group already
exists, and replaceExisting is set to false.
JobPersistenceException
protected void storeTrigger(Connection conn, org.quartz.spi.OperableTrigger newTrigger, JobDetail job, boolean replaceExisting, String state, boolean forceState, boolean recovering) throws ObjectAlreadyExistsException, JobPersistenceException
Insert or update a trigger.
ObjectAlreadyExistsException
JobPersistenceException
protected boolean triggerExists(Connection conn, TriggerKey key) throws JobPersistenceException
Check existence of a given trigger.
JobPersistenceException
public boolean removeJob(JobKey jobKey) throws JobPersistenceException
Remove (delete) the
with the given
name, and any Job
s that reference
it.
Trigger
If removal of the Job
results in an empty group, the
group should be removed from the JobStore
's list of
known group names.
removeJob
in interface org.quartz.spi.JobStore
true
if a Job
with the given name &
group was found and removed from the store.
JobPersistenceException
protected boolean removeJob(Connection conn, JobKey jobKey, boolean activeDeleteSafe) throws JobPersistenceException
JobPersistenceException
public boolean removeJobs(List<JobKey> jobKeys) throws JobPersistenceException
removeJobs
in interface org.quartz.spi.JobStore
JobPersistenceException
public boolean removeTriggers(List<TriggerKey> triggerKeys) throws JobPersistenceException
removeTriggers
in interface org.quartz.spi.JobStore
JobPersistenceException
public void storeJobsAndTriggers(Map<JobDetail,List<Trigger>> triggersAndJobs, boolean replace) throws ObjectAlreadyExistsException, JobPersistenceException
storeJobsAndTriggers
in interface org.quartz.spi.JobStore
ObjectAlreadyExistsException
JobPersistenceException
public JobDetail retrieveJob(JobKey jobKey) throws JobPersistenceException
Retrieve the
for the given
JobDetail
.
Job
retrieveJob
in interface org.quartz.spi.JobStore
Job
, or null if there is no match.
JobPersistenceException
protected JobDetail retrieveJob(Connection conn, JobKey key) throws JobPersistenceException
JobPersistenceException
public boolean removeTrigger(TriggerKey triggerKey) throws JobPersistenceException
Remove (delete) the
with the
given name.
Trigger
If removal of the Trigger
results in an empty group, the
group should be removed from the JobStore
's list of
known group names.
If removal of the Trigger
results in an 'orphaned' Job
that is not 'durable', then the Job
should be deleted
also.
removeTrigger
in interface org.quartz.spi.JobStore
true
if a Trigger
with the given
name & group was found and removed from the store.
JobPersistenceException
protected boolean removeTrigger(Connection conn, TriggerKey key) throws JobPersistenceException
JobPersistenceException
public boolean replaceTrigger(TriggerKey triggerKey, org.quartz.spi.OperableTrigger newTrigger) throws JobPersistenceException
replaceTrigger
in interface org.quartz.spi.JobStore
JobPersistenceException
JobStore.replaceTrigger(TriggerKey, OperableTrigger)
protected boolean replaceTrigger(Connection conn, TriggerKey key, org.quartz.spi.OperableTrigger newTrigger) throws JobPersistenceException
JobPersistenceException
public org.quartz.spi.OperableTrigger retrieveTrigger(TriggerKey triggerKey) throws JobPersistenceException
Retrieve the given
.
Trigger
retrieveTrigger
in interface org.quartz.spi.JobStore
Trigger
, or null if there is no
match.
JobPersistenceException
protected org.quartz.spi.OperableTrigger retrieveTrigger(Connection conn, TriggerKey key) throws JobPersistenceException
JobPersistenceException
public Trigger.TriggerState getTriggerState(TriggerKey triggerKey) throws JobPersistenceException
Get the current state of the identified
.
Trigger
getTriggerState
in interface org.quartz.spi.JobStore
JobPersistenceException
Trigger.TriggerState.NORMAL
,
Trigger.TriggerState.PAUSED
,
Trigger.TriggerState.COMPLETE
,
Trigger.TriggerState.ERROR
,
Trigger.TriggerState.NONE
public Trigger.TriggerState getTriggerState(Connection conn, TriggerKey key) throws JobPersistenceException
JobPersistenceException
public void storeCalendar(String calName, Calendar calendar, boolean replaceExisting, boolean updateTriggers) throws ObjectAlreadyExistsException, JobPersistenceException
Store the given
.
Calendar
storeCalendar
in interface org.quartz.spi.JobStore
calName
- The name of the calendar.calendar
- The Calendar
to be stored.replaceExisting
- If true
, any Calendar
existing
in the JobStore
with the same name & group
should be over-written.
ObjectAlreadyExistsException
- if a Calendar
with the same name already
exists, and replaceExisting is set to false.
JobPersistenceException
protected void storeCalendar(Connection conn, String calName, Calendar calendar, boolean replaceExisting, boolean updateTriggers) throws ObjectAlreadyExistsException, JobPersistenceException
ObjectAlreadyExistsException
JobPersistenceException
protected boolean calendarExists(Connection conn, String calName) throws JobPersistenceException
JobPersistenceException
public boolean removeCalendar(String calName) throws JobPersistenceException
Remove (delete) the
with the
given name.
Calendar
If removal of the Calendar
would result in
Trigger
s pointing to non-existent calendars, then a
JobPersistenceException
will be thrown.
removeCalendar
in interface org.quartz.spi.JobStore
calName
- The name of the Calendar
to be removed.
true
if a Calendar
with the given name
was found and removed from the store.
JobPersistenceException
protected boolean removeCalendar(Connection conn, String calName) throws JobPersistenceException
JobPersistenceException
public Calendar retrieveCalendar(String calName) throws JobPersistenceException
Retrieve the given
.
Trigger
retrieveCalendar
in interface org.quartz.spi.JobStore
calName
- The name of the Calendar
to be retrieved.
Calendar
, or null if there is no
match.
JobPersistenceException
protected Calendar retrieveCalendar(Connection conn, String calName) throws JobPersistenceException
JobPersistenceException
public int getNumberOfJobs() throws JobPersistenceException
Get the number of
s that are
stored in the Job
JobStore
.
getNumberOfJobs
in interface org.quartz.spi.JobStore
JobPersistenceException
protected int getNumberOfJobs(Connection conn) throws JobPersistenceException
JobPersistenceException
public int getNumberOfTriggers() throws JobPersistenceException
Get the number of
s that are
stored in the Trigger
JobsStore
.
getNumberOfTriggers
in interface org.quartz.spi.JobStore
JobPersistenceException
protected int getNumberOfTriggers(Connection conn) throws JobPersistenceException
JobPersistenceException
public int getNumberOfCalendars() throws JobPersistenceException
Get the number of
s that are
stored in the Calendar
JobsStore
.
getNumberOfCalendars
in interface org.quartz.spi.JobStore
JobPersistenceException
protected int getNumberOfCalendars(Connection conn) throws JobPersistenceException
JobPersistenceException
public Set<JobKey> getJobKeys(GroupMatcher<JobKey> matcher) throws JobPersistenceException
Get the names of all of the
s that
matcher the given groupMatcher.
Job
If there are no jobs in the given group name, the result should be an empty Set
getJobKeys
in interface org.quartz.spi.JobStore
JobPersistenceException
protected Set<JobKey> getJobNames(Connection conn, GroupMatcher<JobKey> matcher) throws JobPersistenceException
JobPersistenceException
public boolean checkExists(JobKey jobKey) throws JobPersistenceException
Job
with the given identifier already
exists within the scheduler.
checkExists
in interface org.quartz.spi.JobStore
jobKey
- the identifier to check for
SchedulerException
JobPersistenceException
protected boolean checkExists(Connection conn, JobKey jobKey) throws JobPersistenceException
JobPersistenceException
public boolean checkExists(TriggerKey triggerKey) throws JobPersistenceException
Trigger
with the given identifier already
exists within the scheduler.
checkExists
in interface org.quartz.spi.JobStore
triggerKey
- the identifier to check for
SchedulerException
JobPersistenceException
protected boolean checkExists(Connection conn, TriggerKey triggerKey) throws JobPersistenceException
JobPersistenceException
public void clearAllSchedulingData() throws JobPersistenceException
Job
s, Trigger
s
Calendar
s.
clearAllSchedulingData
in interface org.quartz.spi.JobStore
JobPersistenceException
protected void clearAllSchedulingData(Connection conn) throws JobPersistenceException
JobPersistenceException
public Set<TriggerKey> getTriggerKeys(GroupMatcher<TriggerKey> matcher) throws JobPersistenceException
Get the names of all of the
s
that match the given group Matcher.
Trigger
If there are no triggers in the given group name, the result should be a
an empty Set (not null
).
getTriggerKeys
in interface org.quartz.spi.JobStore
JobPersistenceException
protected Set<TriggerKey> getTriggerNames(Connection conn, GroupMatcher<TriggerKey> matcher) throws JobPersistenceException
JobPersistenceException
public List<String> getJobGroupNames() throws JobPersistenceException
Get the names of all of the
groups.
Job
If there are no known group names, the result should be a zero-length
array (not null
).
getJobGroupNames
in interface org.quartz.spi.JobStore
JobPersistenceException
protected List<String> getJobGroupNames(Connection conn) throws JobPersistenceException
JobPersistenceException
public List<String> getTriggerGroupNames() throws JobPersistenceException
Get the names of all of the
groups.
Trigger
If there are no known group names, the result should be a zero-length
array (not null
).
getTriggerGroupNames
in interface org.quartz.spi.JobStore
JobPersistenceException
protected List<String> getTriggerGroupNames(Connection conn) throws JobPersistenceException
JobPersistenceException
public List<String> getCalendarNames() throws JobPersistenceException
Get the names of all of the
s
in the Calendar
JobStore
.
If there are no Calendars in the given group name, the result should be
a zero-length array (not null
).
getCalendarNames
in interface org.quartz.spi.JobStore
JobPersistenceException
protected List<String> getCalendarNames(Connection conn) throws JobPersistenceException
JobPersistenceException
public List<org.quartz.spi.OperableTrigger> getTriggersForJob(JobKey jobKey) throws JobPersistenceException
Get all of the Triggers that are associated to the given Job.
If there are no matches, a zero-length array should be returned.
getTriggersForJob
in interface org.quartz.spi.JobStore
JobPersistenceException
protected List<org.quartz.spi.OperableTrigger> getTriggersForJob(Connection conn, JobKey key) throws JobPersistenceException
JobPersistenceException
public void pauseTrigger(TriggerKey triggerKey) throws JobPersistenceException
Pause the
with the given name.
Trigger
pauseTrigger
in interface org.quartz.spi.JobStore
JobPersistenceException
resumeTrigger(TriggerKey)
public void pauseTrigger(Connection conn, TriggerKey triggerKey) throws JobPersistenceException
Pause the
with the given name.
Trigger
JobPersistenceException
resumeTrigger(Connection, TriggerKey)
public void pauseJob(JobKey jobKey) throws JobPersistenceException
Pause the
with the given name - by
pausing all of its current Job
Trigger
s.
pauseJob
in interface org.quartz.spi.JobStore
JobPersistenceException
resumeJob(JobKey)
public Set<String> pauseJobs(GroupMatcher<JobKey> matcher) throws JobPersistenceException
Pause all of the
matching the given
groupMatcher - by pausing all of their Job
sTrigger
s.
pauseJobs
in interface org.quartz.spi.JobStore
JobPersistenceException
#resumeJobGroup(SchedulingContext, String)
protected String checkBlockedState(Connection conn, JobKey jobKey, String currentState) throws JobPersistenceException
JobPersistenceException
public void resumeTrigger(TriggerKey triggerKey) throws JobPersistenceException
Resume (un-pause) the
with the
given name.
Trigger
If the Trigger
missed one or more fire-times, then the
Trigger
's misfire instruction will be applied.
resumeTrigger
in interface org.quartz.spi.JobStore
JobPersistenceException
pauseTrigger(TriggerKey)
public void resumeTrigger(Connection conn, TriggerKey key) throws JobPersistenceException
Resume (un-pause) the
with the
given name.
Trigger
If the Trigger
missed one or more fire-times, then the
Trigger
's misfire instruction will be applied.
JobPersistenceException
pauseTrigger(Connection, TriggerKey)
public void resumeJob(JobKey jobKey) throws JobPersistenceException
Resume (un-pause) the
with the
given name.
Job
If any of the Job
'sTrigger
s missed one
or more fire-times, then the Trigger
's misfire
instruction will be applied.
resumeJob
in interface org.quartz.spi.JobStore
JobPersistenceException
pauseJob(JobKey)
public Set<String> resumeJobs(GroupMatcher<JobKey> matcher) throws JobPersistenceException
Resume (un-pause) all of the
in
the given group.
Job
s
If any of the Job
s had Trigger
s that
missed one or more fire-times, then the Trigger
's
misfire instruction will be applied.
resumeJobs
in interface org.quartz.spi.JobStore
JobPersistenceException
#pauseJobGroup(SchedulingContext, String)
public Set<String> pauseTriggers(GroupMatcher<TriggerKey> matcher) throws JobPersistenceException
Pause all of the
matching the
given groupMatcher.
Trigger
s
pauseTriggers
in interface org.quartz.spi.JobStore
JobPersistenceException
#resumeTriggerGroup(SchedulingContext, String)
public Set<String> pauseTriggerGroup(Connection conn, GroupMatcher<TriggerKey> matcher) throws JobPersistenceException
Pause all of the
matching the
given groupMatcher.
Trigger
s
JobPersistenceException
#resumeTriggerGroup(Connection, SchedulingContext, String)
public Set<String> getPausedTriggerGroups() throws JobPersistenceException
getPausedTriggerGroups
in interface org.quartz.spi.JobStore
JobPersistenceException
public Set<String> getPausedTriggerGroups(Connection conn) throws JobPersistenceException
Pause all of the
in the
given group.
Trigger
s
JobPersistenceException
resumeTriggers(org.quartz.impl.matchers.GroupMatcher)
public Set<String> resumeTriggers(GroupMatcher<TriggerKey> matcher) throws JobPersistenceException
Resume (un-pause) all of the
matching the given groupMatcher.
Trigger
s
If any Trigger
missed one or more fire-times, then the
Trigger
's misfire instruction will be applied.
resumeTriggers
in interface org.quartz.spi.JobStore
JobPersistenceException
pauseTriggers(org.quartz.impl.matchers.GroupMatcher)
public Set<String> resumeTriggerGroup(Connection conn, GroupMatcher<TriggerKey> matcher) throws JobPersistenceException
Resume (un-pause) all of the
matching the given groupMatcher.
Trigger
s
If any Trigger
missed one or more fire-times, then the
Trigger
's misfire instruction will be applied.
JobPersistenceException
pauseTriggers(org.quartz.impl.matchers.GroupMatcher)
public void pauseAll() throws JobPersistenceException
Pause all triggers - equivalent of calling pauseTriggerGroup(group)
on every group.
When resumeAll()
is called (to un-pause), trigger misfire
instructions WILL be applied.
pauseAll
in interface org.quartz.spi.JobStore
JobPersistenceException
resumeAll()
,
#pauseTriggerGroup(SchedulingContext, String)
public void pauseAll(Connection conn) throws JobPersistenceException
Pause all triggers - equivalent of calling pauseTriggerGroup(group)
on every group.
When resumeAll()
is called (to un-pause), trigger misfire
instructions WILL be applied.
JobPersistenceException
resumeAll(Connection)
,
#pauseTriggerGroup(SchedulingContext, String)
public void resumeAll() throws JobPersistenceException
Resume (un-pause) all triggers - equivalent of calling resumeTriggerGroup(group)
on every group.
If any Trigger
missed one or more fire-times, then the
Trigger
's misfire instruction will be applied.
resumeAll
in interface org.quartz.spi.JobStore
JobPersistenceException
pauseAll()
public void resumeAll(Connection conn) throws JobPersistenceException
Resume (un-pause) all triggers - equivalent of calling resumeTriggerGroup(group)
on every group.
If any Trigger
missed one or more fire-times, then the
Trigger
's misfire instruction will be applied.
JobPersistenceException
pauseAll(Connection)
protected String getFiredTriggerRecordId()
public List<org.quartz.spi.OperableTrigger> acquireNextTriggers(long noLaterThan, int maxCount, long timeWindow) throws JobPersistenceException
Get a handle to the next N triggers to be fired, and mark them as 'reserved' by the calling scheduler.
acquireNextTriggers
in interface org.quartz.spi.JobStore
JobPersistenceException
releaseAcquiredTrigger(OperableTrigger)
protected List<org.quartz.spi.OperableTrigger> acquireNextTrigger(Connection conn, long noLaterThan, int maxCount, long timeWindow) throws JobPersistenceException
JobPersistenceException
public void releaseAcquiredTrigger(org.quartz.spi.OperableTrigger trigger) throws JobPersistenceException
Inform the JobStore
that the scheduler no longer plans to
fire the given Trigger
, that it had previously acquired
(reserved).
releaseAcquiredTrigger
in interface org.quartz.spi.JobStore
JobPersistenceException
protected void releaseAcquiredTrigger(Connection conn, org.quartz.spi.OperableTrigger trigger) throws JobPersistenceException
JobPersistenceException
public List<org.quartz.spi.TriggerFiredResult> triggersFired(List<org.quartz.spi.OperableTrigger> triggers) throws JobPersistenceException
Inform the JobStore
that the scheduler is now firing the
given Trigger
(executing its associated Job
),
that it had previously acquired (reserved).
triggersFired
in interface org.quartz.spi.JobStore
JobPersistenceException
protected org.quartz.spi.TriggerFiredBundle triggerFired(Connection conn, org.quartz.spi.OperableTrigger trigger) throws JobPersistenceException
JobPersistenceException
public void triggeredJobComplete(org.quartz.spi.OperableTrigger trigger, JobDetail jobDetail, Trigger.CompletedExecutionInstruction triggerInstCode) throws JobPersistenceException
Inform the JobStore
that the scheduler has completed the
firing of the given Trigger
(and the execution its
associated Job
), and that the
in the given JobDataMap
JobDetail
should be updated if the Job
is stateful.
triggeredJobComplete
in interface org.quartz.spi.JobStore
JobPersistenceException
protected void triggeredJobComplete(Connection conn, org.quartz.spi.OperableTrigger trigger, JobDetail jobDetail, Trigger.CompletedExecutionInstruction triggerInstCode) throws JobPersistenceException
JobPersistenceException
protected DriverDelegate getDelegate() throws NoSuchDelegateException
Get the driver delegate for DB operations.
NoSuchDelegateException
protected Semaphore getLockHandler()
public void setLockHandler(Semaphore lockHandler)
protected JobStoreSupport.RecoverMisfiredJobsResult doRecoverMisfires() throws JobPersistenceException
JobPersistenceException
protected void signalSchedulingChangeOnTxCompletion(long candidateNewNextFireTime)
protected Long clearAndGetSignalSchedulingChangeOnTxCompletion()
protected void signalSchedulingChangeImmediately(long candidateNewNextFireTime)
protected boolean doCheckin() throws JobPersistenceException
JobPersistenceException
protected List<SchedulerStateRecord> findFailedInstances(Connection conn) throws JobPersistenceException
JobPersistenceException
protected long calcFailedIfAfter(SchedulerStateRecord rec)
protected List<SchedulerStateRecord> clusterCheckIn(Connection conn) throws JobPersistenceException
JobPersistenceException
protected void clusterRecover(Connection conn, List<SchedulerStateRecord> failedInstances) throws JobPersistenceException
JobPersistenceException
protected void logWarnIfNonZero(int val, String warning)
protected void cleanupConnection(Connection conn)
Cleanup the given database connection. This means restoring any modified auto commit or transaction isolation connection attributes, and then closing the underlying connection.
This is separate from closeConnection() because the Spring integration relies on being able to overload closeConnection() and expects the same connection back that it originally returned from the datasource.
closeConnection(Connection)
protected void closeConnection(Connection conn)
Connection
.
Ignores a null Connection
.
Any exception thrown trying to close the Connection
is
logged and ignored.
conn
- The Connection
to close (Optional).protected void rollbackConnection(Connection conn)
Logs any SQLException it gets trying to rollback, but will not propogate the exception lest it mask the exception that caused the caller to need to rollback in the first place.
conn
- (Optional)protected void commitConnection(Connection conn) throws JobPersistenceException
conn
- (Optional)
JobPersistenceException
- thrown if a SQLException occurs when the
connection is committedpublic Object executeWithoutLock(JobStoreSupport.TransactionCallback txCallback) throws JobPersistenceException
This method just forwards to executeInLock() with a null lockName.
JobPersistenceException
executeInLock(String, TransactionCallback)
protected void executeInLock(String lockName, JobStoreSupport.VoidTransactionCallback txCallback) throws JobPersistenceException
lockName
- The name of the lock to acquire, for example
"TRIGGER_ACCESS". If null, then no lock is acquired, but the
lockCallback is still executed in a transaction.
JobPersistenceException
executeInLock(String, TransactionCallback)
protected abstract Object executeInLock(String lockName, JobStoreSupport.TransactionCallback txCallback) throws JobPersistenceException
lockName
- The name of the lock to acquire, for example
"TRIGGER_ACCESS". If null, then no lock is acquired, but the
lockCallback is still executed in a transaction.
JobPersistenceException
protected void executeInNonManagedTXLock(String lockName, JobStoreSupport.VoidTransactionCallback txCallback) throws JobPersistenceException
lockName
- The name of the lock to acquire, for example
"TRIGGER_ACCESS". If null, then no lock is acquired, but the
lockCallback is still executed in a non-managed transaction.
JobPersistenceException
executeInNonManagedTXLock(String, TransactionCallback)
protected Object executeInNonManagedTXLock(String lockName, JobStoreSupport.TransactionCallback txCallback) throws JobPersistenceException
lockName
- The name of the lock to acquire, for example
"TRIGGER_ACCESS". If null, then no lock is acquired, but the
lockCallback is still executed in a non-managed transaction.
JobPersistenceException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |