Index: branches/toolkit-2.0/quartz/pom.xml
===================================================================
diff -u -N -r2133 -r2134
--- branches/toolkit-2.0/quartz/pom.xml (.../pom.xml) (revision 2133)
+++ branches/toolkit-2.0/quartz/pom.xml (.../pom.xml) (revision 2134)
@@ -14,6 +14,7 @@
Enterprise Job Scheduler
+ 1.4
Index: branches/toolkit-2.0/terracotta/bootstrap/src/main/java/org/terracotta/quartz/DefaultClusteredJobStore.java
===================================================================
diff -u -N -r2097 -r2134
--- branches/toolkit-2.0/terracotta/bootstrap/src/main/java/org/terracotta/quartz/DefaultClusteredJobStore.java (.../DefaultClusteredJobStore.java) (revision 2097)
+++ branches/toolkit-2.0/terracotta/bootstrap/src/main/java/org/terracotta/quartz/DefaultClusteredJobStore.java (.../DefaultClusteredJobStore.java) (revision 2134)
@@ -1,18 +1,10 @@
-/*
- * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved.
- *
- * 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.
- *
+/*
+ * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. 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.terracotta.quartz;
@@ -182,6 +174,7 @@
*
*/
+ @Override
// XXX: remove this suppression
@SuppressWarnings("unchecked")
public void initialize(ClassLoadHelper loadHelper, SchedulerSignaler schedulerSignaler) {
@@ -198,6 +191,7 @@
((ToolkitInternal) toolkit).registerBeforeShutdownHook(new ShutdownHook(this));
}
+ @Override
public void schedulerStarted() throws SchedulerException {
clusterInfo.addClusterListener(this);
@@ -253,10 +247,12 @@
}
}
+ @Override
public void schedulerPaused() {
// do nothing
}
+ @Override
public void schedulerResumed() {
// do nothing
}
@@ -319,14 +315,12 @@
}
if (jobWrapper.requestsRecovery()) {
- SimpleTriggerImpl recoveryTrigger = new SimpleTriggerImpl("recover_" + terracottaClientId + "_" + ftrCtr++,
- Scheduler.DEFAULT_RECOVERY_GROUP, new Date());
+ OperableTrigger recoveryTrigger = createRecoveryTrigger(jobWrapper, "recover_" + terracottaClientId + "_"
+ + ftrCtr++);
- recoveryTrigger.setJobName(jobWrapper.getKey().getName());
- recoveryTrigger.setJobGroup(jobWrapper.getKey().getGroup());
recoveryTrigger.setMisfireInstruction(SimpleTrigger.MISFIRE_INSTRUCTION_FIRE_NOW);
recoveryTrigger.setPriority(tw.getPriority());
- JobDataMap jd = jobWrapper.getJobDataMapClone();
+ JobDataMap jd = recoveryTrigger.getJobDataMap();
jd.put(Scheduler.FAILED_JOB_ORIGINAL_TRIGGER_NAME, tw.getKey().getName());
jd.put(Scheduler.FAILED_JOB_ORIGINAL_TRIGGER_GROUP, tw.getKey().getGroup());
jd.put(Scheduler.FAILED_JOB_ORIGINAL_TRIGGER_FIRETIME_IN_MILLISECONDS, String.valueOf(origFireTime));
@@ -348,6 +342,14 @@
}
}
+ protected OperableTrigger createRecoveryTrigger(JobWrapper jw,
+ String name) {
+ final SimpleTriggerImpl recoveryTrigger = new SimpleTriggerImpl(name, Scheduler.DEFAULT_RECOVERY_GROUP, new Date());
+ recoveryTrigger.setJobName(jw.getKey().getName());
+ recoveryTrigger.setJobGroup(jw.getKey().getGroup());
+ return recoveryTrigger;
+ }
+
private long getMisfireThreshold() {
return misfireThreshold;
}
@@ -358,6 +360,7 @@
*
* @param misfireThreshold
*/
+ @Override
public void setMisfireThreshold(long misfireThreshold) {
if (misfireThreshold < 1) { throw new IllegalArgumentException("Misfirethreashold must be larger than 0"); }
@@ -381,10 +384,12 @@
* because the scheduler is shutting down.
*
*/
+ @Override
public void shutdown() {
// nothing to do
}
+ @Override
public boolean supportsPersistence() {
// We throw an assertion here since this method should never be called directly on this instance.
throw new AssertionError();
@@ -399,6 +404,7 @@
* @param newTrigger The Trigger
to be stored.
* @throws ObjectAlreadyExistsException if a Job
with the same name/group already exists.
*/
+ @Override
public void storeJobAndTrigger(JobDetail newJob, OperableTrigger newTrigger) throws JobPersistenceException {
storeJob(newJob, false);
storeTrigger(newTrigger, false);
@@ -415,6 +421,7 @@
* @throws ObjectAlreadyExistsException if a Job
with the same name/group already exists, and
* replaceExisting is set to false.
*/
+ @Override
public void storeJob(JobDetail newJob, boolean replaceExisting) throws ObjectAlreadyExistsException,
JobPersistenceException {
JobDetail clone = (JobDetail) newJob.clone();
@@ -453,6 +460,7 @@
* @param jobKey The key of the Job
to be removed.
* @return true
if a Job
with the given name & group was found and removed from the store.
*/
+ @Override
public boolean removeJob(JobKey jobKey) throws JobPersistenceException {
boolean found = false;
lock();
@@ -479,6 +487,7 @@
return found;
}
+ @Override
public boolean removeJobs(List jobKeys) throws JobPersistenceException {
boolean allFound = true;
@@ -493,6 +502,7 @@
return allFound;
}
+ @Override
public boolean removeTriggers(List triggerKeys) throws JobPersistenceException {
boolean allFound = true;
@@ -507,7 +517,8 @@
return allFound;
}
- public void storeJobsAndTriggers(Map> triggersAndJobs, boolean replace)
+ @Override
+ public void storeJobsAndTriggers(Map> triggersAndJobs, boolean replace)
throws ObjectAlreadyExistsException, JobPersistenceException {
lock();
@@ -545,6 +556,7 @@
* replaceExisting is set to false.
* @see #pauseTriggers(org.quartz.impl.matchers.GroupMatcher)
*/
+ @Override
public void storeTrigger(OperableTrigger newTrigger, boolean replaceExisting) throws JobPersistenceException {
OperableTrigger clone = (OperableTrigger) newTrigger.clone();
@@ -601,6 +613,7 @@
* @return true
if a Trigger
with the given name & group was found and removed from the
* store.
*/
+ @Override
public boolean removeTrigger(TriggerKey triggerKey) throws JobPersistenceException {
return removeTrigger(triggerKey, true);
}
@@ -645,6 +658,7 @@
/**
* @see org.quartz.spi.JobStore#replaceTrigger
*/
+ @Override
public boolean replaceTrigger(TriggerKey triggerKey, OperableTrigger newTrigger) throws JobPersistenceException {
boolean found = false;
@@ -688,6 +702,7 @@
* @param jobKey The key of the Job
to be retrieved.
* @return The desired Job
, or null if there is no match.
*/
+ @Override
public JobDetail retrieveJob(JobKey jobKey) throws JobPersistenceException {
JobWrapper jobWrapper = getJob(jobKey);
return jobWrapper == null ? null : (JobDetail) jobWrapper.getJobDetailClone();
@@ -710,6 +725,7 @@
* @param triggerKey The key of the Trigger
to be retrieved.
* @return The desired Trigger
, or null if there is no match.
*/
+ @Override
public OperableTrigger retrieveTrigger(TriggerKey triggerKey) throws JobPersistenceException {
lock();
try {
@@ -720,6 +736,7 @@
}
}
+ @Override
public boolean checkExists(final JobKey jobKey) {
return jobFacade.containsKey(jobKey);
}
@@ -729,10 +746,12 @@
*
* @throws JobPersistenceException
*/
+ @Override
public boolean checkExists(final TriggerKey triggerKey) throws JobPersistenceException {
return triggerFacade.containsKey(triggerKey);
}
+ @Override
public void clearAllSchedulingData() throws JobPersistenceException {
lock();
try {
@@ -769,6 +788,7 @@
*
* @see Trigger.TriggerState
*/
+ @Override
public Trigger.TriggerState getTriggerState(org.quartz.TriggerKey key) throws JobPersistenceException {
TriggerWrapper tw;
@@ -808,6 +828,7 @@
* @throws ObjectAlreadyExistsException if a Calendar
with the same name already exists, and
* replaceExisting is set to false.
*/
+ @Override
public void storeCalendar(String name, Calendar calendar, boolean replaceExisting, boolean updateTriggers)
throws ObjectAlreadyExistsException, JobPersistenceException {
@@ -855,6 +876,7 @@
* @param calName The name of the Calendar
to be removed.
* @return true
if a Calendar
with the given name was found and removed from the store.
*/
+ @Override
public boolean removeCalendar(String calName) throws JobPersistenceException {
int numRefs = 0;
@@ -883,6 +905,7 @@
* @param calName The name of the Calendar
to be retrieved.
* @return The desired Calendar
, or null if there is no match.
*/
+ @Override
public Calendar retrieveCalendar(String calName) throws JobPersistenceException {
lock();
try {
@@ -898,6 +921,7 @@
* Get the number of {@link org.quartz.JobDetail}
s that are stored in the JobsStore
.
*
*/
+ @Override
public int getNumberOfJobs() throws JobPersistenceException {
lock();
try {
@@ -912,6 +936,7 @@
* Get the number of {@link org.quartz.Trigger}
s that are stored in the JobsStore
.
*
*/
+ @Override
public int getNumberOfTriggers() throws JobPersistenceException {
lock();
try {
@@ -926,6 +951,7 @@
* Get the number of {@link org.quartz.Calendar}
s that are stored in the JobsStore
.
*
*/
+ @Override
public int getNumberOfCalendars() throws JobPersistenceException {
lock();
try {
@@ -940,6 +966,7 @@
* Get the names of all of the {@link org.quartz.Job}
s that have the given group name.
*
*/
+ @Override
public Set getJobKeys(GroupMatcher matcher) throws JobPersistenceException {
lock();
try {
@@ -983,6 +1010,7 @@
* ).
*
*/
+ @Override
public List getCalendarNames() throws JobPersistenceException {
lock();
try {
@@ -998,6 +1026,7 @@
* Get the names of all of the {@link org.quartz.Trigger}
s that have the given group name.
*
*/
+ @Override
public Set getTriggerKeys(GroupMatcher matcher) throws JobPersistenceException {
lock();
try {
@@ -1039,6 +1068,7 @@
* Get the names of all of the {@link org.quartz.Job}
groups.
*
*/
+ @Override
public List getJobGroupNames() throws JobPersistenceException {
lock();
try {
@@ -1053,6 +1083,7 @@
* Get the names of all of the {@link org.quartz.Trigger}
groups.
*
*/
+ @Override
public List getTriggerGroupNames() throws JobPersistenceException {
lock();
try {
@@ -1070,6 +1101,7 @@
* If there are no matches, a zero-length array should be returned.
*
*/
+ @Override
public List getTriggersForJob(final JobKey jobKey) throws JobPersistenceException {
List trigList = new ArrayList();
@@ -1093,6 +1125,7 @@
* Pause the {@link Trigger}
with the given name.
*
*/
+ @Override
public void pauseTrigger(TriggerKey triggerKey) throws JobPersistenceException {
lock();
try {
@@ -1128,6 +1161,7 @@
* the group while the group is paused.
*
*/
+ @Override
public Collection pauseTriggers(GroupMatcher matcher) throws JobPersistenceException {
HashSet pausedGroups = new HashSet();
lock();
@@ -1156,6 +1190,7 @@
* Trigger
s.
*
*/
+ @Override
public void pauseJob(JobKey jobKey) throws JobPersistenceException {
lock();
try {
@@ -1177,6 +1212,7 @@
* group while the group is paused.
*
*/
+ @Override
public Collection pauseJobs(GroupMatcher matcher) throws JobPersistenceException {
Collection pausedGroups = new HashSet();
lock();
@@ -1211,6 +1247,7 @@
* be applied.
*
*/
+ @Override
public void resumeTrigger(TriggerKey triggerKey) throws JobPersistenceException {
lock();
try {
@@ -1247,6 +1284,7 @@
* be applied.
*
*/
+ @Override
public Collection resumeTriggers(GroupMatcher matcher) throws JobPersistenceException {
Collection groups = new HashSet();
lock();
@@ -1281,6 +1319,7 @@
* 's misfire instruction will be applied.
*
*/
+ @Override
public void resumeJob(JobKey jobKey) throws JobPersistenceException {
lock();
@@ -1302,6 +1341,7 @@
* Trigger
's misfire instruction will be applied.
*
*/
+ @Override
public Collection resumeJobs(GroupMatcher matcher) throws JobPersistenceException {
Collection groups = new HashSet();
lock();
@@ -1333,6 +1373,7 @@
* @see #resumeAll()
* @see #pauseTriggers(org.quartz.impl.matchers.GroupMatcher)
*/
+ @Override
public void pauseAll() throws JobPersistenceException {
lock();
@@ -1358,6 +1399,7 @@
*
* @see #pauseAll()
*/
+ @Override
public void resumeAll() throws JobPersistenceException {
lock();
@@ -1401,6 +1443,7 @@
return true;
}
+ @Override
public List acquireNextTriggers(long noLaterThan, int maxCount, long timeWindow)
throws JobPersistenceException {
@@ -1528,6 +1571,7 @@
* had previously acquired (reserved).
*
*/
+ @Override
public void releaseAcquiredTrigger(OperableTrigger trigger) throws JobPersistenceException {
lock();
try {
@@ -1547,6 +1591,7 @@
* associated Job
), that it had previously acquired (reserved).
*
*/
+ @Override
public List triggersFired(List triggersFired) throws JobPersistenceException {
lock();
@@ -1635,6 +1680,7 @@
* given JobDetail
should be updated if the Job
is stateful.
*
*/
+ @Override
public void triggeredJobComplete(OperableTrigger trigger, JobDetail jobDetail,
CompletedExecutionInstruction triggerInstCode) throws JobPersistenceException {
@@ -1731,6 +1777,7 @@
/**
* @see org.quartz.spi.JobStore#getPausedTriggerGroups()
*/
+ @Override
public Set getPausedTriggerGroups() throws JobPersistenceException {
lock();
try {
@@ -1740,10 +1787,12 @@
}
}
+ @Override
public void setInstanceId(String schedInstId) {
//
}
+ @Override
public void setInstanceName(String schedName) {
//
}
@@ -1798,20 +1847,24 @@
signaler.signalSchedulingChange(0);
}
+ @Override
public long getEstimatedTimeToReleaseAndAcquireTrigger() {
// right now this is a static (but configurable) value. It could be based on actual observation
// of trigger acquire/release at runtime in the future though
return this.estimatedTimeToReleaseAndAcquireTrigger;
}
+ @Override
public void setEstimatedTimeToReleaseAndAcquireTrigger(long estimate) {
this.estimatedTimeToReleaseAndAcquireTrigger = estimate;
}
+ @Override
public void setThreadPoolSize(final int size) {
//
}
+ @Override
public boolean isClustered() {
// We throw an assertion here since this method should never be called directly on this instance.
throw new AssertionError();
@@ -1828,6 +1881,7 @@
this.store = store;
}
+ @Override
public void run() {
store.disable();
}
Index: branches/toolkit-2.0/terracotta/bootstrap/src/main/java/org/terracotta/quartz/PlainTerracottaJobStore.java
===================================================================
diff -u -N -r2095 -r2134
--- branches/toolkit-2.0/terracotta/bootstrap/src/main/java/org/terracotta/quartz/PlainTerracottaJobStore.java (.../PlainTerracottaJobStore.java) (revision 2095)
+++ branches/toolkit-2.0/terracotta/bootstrap/src/main/java/org/terracotta/quartz/PlainTerracottaJobStore.java (.../PlainTerracottaJobStore.java) (revision 2134)
@@ -1,16 +1,16 @@
-/*
- * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved.
+/*
+ * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved.
*
- * 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
+ * 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
+ * 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.
*
*/
@@ -61,63 +61,78 @@
this.clusterInfo = toolkit.getClusterInfo();
}
+ @Override
public void setSynchronousWrite(String synchWrite) {
this.synchWrite = synchWrite;
}
+ @Override
public void setThreadPoolSize(final int size) {
this.threadPoolSize = size;
}
+ @Override
public List acquireNextTriggers(long noLaterThan, int maxCount, long timeWindow)
throws JobPersistenceException {
return clusteredJobStore.acquireNextTriggers(noLaterThan, maxCount, timeWindow);
}
+ @Override
public List getCalendarNames() throws JobPersistenceException {
return clusteredJobStore.getCalendarNames();
}
+ @Override
public List getJobGroupNames() throws JobPersistenceException {
return clusteredJobStore.getJobGroupNames();
}
+ @Override
public Set getJobKeys(final GroupMatcher matcher) throws JobPersistenceException {
return clusteredJobStore.getJobKeys(matcher);
}
+ @Override
public int getNumberOfCalendars() throws JobPersistenceException {
return clusteredJobStore.getNumberOfCalendars();
}
+ @Override
public int getNumberOfJobs() throws JobPersistenceException {
return clusteredJobStore.getNumberOfJobs();
}
+ @Override
public int getNumberOfTriggers() throws JobPersistenceException {
return clusteredJobStore.getNumberOfTriggers();
}
+ @Override
public Set getPausedTriggerGroups() throws JobPersistenceException {
return clusteredJobStore.getPausedTriggerGroups();
}
+ @Override
public List getTriggerGroupNames() throws JobPersistenceException {
return clusteredJobStore.getTriggerGroupNames();
}
+ @Override
public Set getTriggerKeys(final GroupMatcher matcher) throws JobPersistenceException {
return clusteredJobStore.getTriggerKeys(matcher);
}
+ @Override
public List getTriggersForJob(final JobKey jobKey) throws JobPersistenceException {
return clusteredJobStore.getTriggersForJob(jobKey);
}
+ @Override
public Trigger.TriggerState getTriggerState(final TriggerKey triggerKey) throws JobPersistenceException {
return clusteredJobStore.getTriggerState(triggerKey);
}
+ @Override
public synchronized void initialize(ClassLoadHelper loadHelper, SchedulerSignaler signaler)
throws SchedulerConfigException {
if (clusteredJobStore != null) { throw new IllegalStateException("already initialized"); }
@@ -142,119 +157,148 @@
scheduleUpdateCheck();
}
+ @Override
public void pauseAll() throws JobPersistenceException {
clusteredJobStore.pauseAll();
}
+ @Override
public void pauseJob(final JobKey jobKey) throws JobPersistenceException {
clusteredJobStore.pauseJob(jobKey);
}
+ @Override
public Collection pauseJobs(GroupMatcher matcher) throws JobPersistenceException {
return clusteredJobStore.pauseJobs(matcher);
}
+ @Override
public void pauseTrigger(TriggerKey triggerKey) throws JobPersistenceException {
clusteredJobStore.pauseTrigger(triggerKey);
}
+ @Override
public Collection pauseTriggers(GroupMatcher matcher) throws JobPersistenceException {
return clusteredJobStore.pauseTriggers(matcher);
}
+ @Override
public void releaseAcquiredTrigger(final OperableTrigger trigger) throws JobPersistenceException {
clusteredJobStore.releaseAcquiredTrigger(trigger);
}
+ @Override
public List triggersFired(final List triggers) throws JobPersistenceException {
return clusteredJobStore.triggersFired(triggers);
}
+ @Override
public boolean removeCalendar(String calName) throws JobPersistenceException {
return clusteredJobStore.removeCalendar(calName);
}
+ @Override
public boolean removeJob(JobKey jobKey) throws JobPersistenceException {
return clusteredJobStore.removeJob(jobKey);
}
+ @Override
public boolean removeTrigger(TriggerKey triggerKey) throws JobPersistenceException {
return clusteredJobStore.removeTrigger(triggerKey);
}
+ @Override
public boolean removeJobs(List jobKeys) throws JobPersistenceException {
return clusteredJobStore.removeJobs(jobKeys);
}
+ @Override
public boolean removeTriggers(List triggerKeys) throws JobPersistenceException {
return clusteredJobStore.removeTriggers(triggerKeys);
}
- public void storeJobsAndTriggers(Map> triggersAndJobs, boolean replace)
+ @Override
+ public void storeJobsAndTriggers(Map> triggersAndJobs, boolean replace)
throws ObjectAlreadyExistsException, JobPersistenceException {
clusteredJobStore.storeJobsAndTriggers(triggersAndJobs, replace);
}
+ @Override
public boolean replaceTrigger(TriggerKey triggerKey, OperableTrigger newTrigger) throws JobPersistenceException {
return clusteredJobStore.replaceTrigger(triggerKey, newTrigger);
}
+ @Override
public void resumeAll() throws JobPersistenceException {
clusteredJobStore.resumeAll();
}
+ @Override
public void resumeJob(JobKey jobKey) throws JobPersistenceException {
clusteredJobStore.resumeJob(jobKey);
}
+ @Override
public Collection resumeJobs(GroupMatcher matcher) throws JobPersistenceException {
return clusteredJobStore.resumeJobs(matcher);
}
+ @Override
public void resumeTrigger(TriggerKey triggerKey) throws JobPersistenceException {
clusteredJobStore.resumeTrigger(triggerKey);
}
+ @Override
public Collection resumeTriggers(GroupMatcher matcher) throws JobPersistenceException {
return clusteredJobStore.resumeTriggers(matcher);
}
+ @Override
public Calendar retrieveCalendar(String calName) throws JobPersistenceException {
return clusteredJobStore.retrieveCalendar(calName);
}
+ @Override
public JobDetail retrieveJob(JobKey jobKey) throws JobPersistenceException {
return clusteredJobStore.retrieveJob(jobKey);
}
+ @Override
public OperableTrigger retrieveTrigger(TriggerKey triggerKey) throws JobPersistenceException {
return clusteredJobStore.retrieveTrigger(triggerKey);
}
+ @Override
public boolean checkExists(final JobKey jobKey) throws JobPersistenceException {
return clusteredJobStore.checkExists(jobKey);
}
+ @Override
public boolean checkExists(final TriggerKey triggerKey) throws JobPersistenceException {
return clusteredJobStore.checkExists(triggerKey);
}
+ @Override
public void clearAllSchedulingData() throws JobPersistenceException {
clusteredJobStore.clearAllSchedulingData();
}
+ @Override
public void schedulerStarted() throws SchedulerException {
clusteredJobStore.schedulerStarted();
}
+ @Override
public void schedulerPaused() {
clusteredJobStore.schedulerPaused();
}
+ @Override
public void schedulerResumed() {
clusteredJobStore.schedulerResumed();
}
+ @Override
public void shutdown() {
if (clusteredJobStore != null) {
clusteredJobStore.shutdown();
@@ -264,26 +308,31 @@
}
}
+ @Override
public void storeCalendar(String name, Calendar calendar, boolean replaceExisting, boolean updateTriggers)
throws ObjectAlreadyExistsException, JobPersistenceException {
clusteredJobStore.storeCalendar(name, calendar, replaceExisting, updateTriggers);
}
+ @Override
public void storeJob(JobDetail newJob, boolean replaceExisting) throws ObjectAlreadyExistsException,
JobPersistenceException {
clusteredJobStore.storeJob(newJob, replaceExisting);
}
+ @Override
public void storeJobAndTrigger(JobDetail newJob, OperableTrigger newTrigger) throws ObjectAlreadyExistsException,
JobPersistenceException {
clusteredJobStore.storeJobAndTrigger(newJob, newTrigger);
}
+ @Override
public void storeTrigger(OperableTrigger newTrigger, boolean replaceExisting) throws ObjectAlreadyExistsException,
JobPersistenceException {
clusteredJobStore.storeTrigger(newTrigger, replaceExisting);
}
+ @Override
public boolean supportsPersistence() {
return true;
}
@@ -293,11 +342,13 @@
return clusteredJobStore.toString();
}
+ @Override
public void triggeredJobComplete(OperableTrigger trigger, JobDetail jobDetail,
CompletedExecutionInstruction triggerInstCode) throws JobPersistenceException {
clusteredJobStore.triggeredJobComplete(trigger, jobDetail, triggerInstCode);
}
+ @Override
public synchronized void setMisfireThreshold(long threshold) {
ClusteredJobStore cjs = clusteredJobStore;
if (cjs != null) {
@@ -307,6 +358,7 @@
}
}
+ @Override
public synchronized void setEstimatedTimeToReleaseAndAcquireTrigger(long estimate) {
ClusteredJobStore cjs = clusteredJobStore;
if (cjs != null) {
@@ -316,14 +368,17 @@
}
}
+ @Override
public void setInstanceId(String schedInstId) {
this.schedInstanceId = schedInstId;
}
+ @Override
public void setInstanceName(String schedName) {
this.schedName = schedName;
}
+ @Override
public String getUUID() {
return clusterInfo.getCurrentNode().getId();
}
@@ -339,10 +394,12 @@
}
}
+ @Override
public long getEstimatedTimeToReleaseAndAcquireTrigger() {
return clusteredJobStore.getEstimatedTimeToReleaseAndAcquireTrigger();
}
+ @Override
public boolean isClustered() {
return true;
}
@@ -351,18 +408,22 @@
return clusteredJobStore;
}
+ @Override
public String getName() {
return this.getClass().getName();
}
+ @Override
public void jobToBeExecuted(final JobExecutionContext context) {
//
}
+ @Override
public void jobExecutionVetoed(final JobExecutionContext context) {
//
}
+ @Override
public void jobWasExecuted(final JobExecutionContext context, final JobExecutionException jobException) {
//
}