1 17 18 21 package org.quartz.impl.jdbcjobstore; 22 23 import java.io.IOException ; 24 import java.sql.Connection ; 25 import java.sql.SQLException ; 26 import java.util.List ; 27 import java.util.Set ; 28 29 import org.quartz.Calendar; 30 import org.quartz.CronTrigger; 31 import org.quartz.JobDataMap; 32 import org.quartz.JobDetail; 33 import org.quartz.SimpleTrigger; 34 import org.quartz.Trigger; 35 import org.quartz.spi.ClassLoadHelper; 36 import org.quartz.utils.Key; 37 import org.quartz.utils.TriggerStatus; 38 39 60 interface DriverDelegate { 61 62 69 70 89 int updateTriggerStatesFromOtherStates(Connection conn, 90 String newState, String oldState1, String oldState2) 91 throws SQLException ; 92 93 104 Key[] selectMisfiredTriggers(Connection conn, long ts) 105 throws SQLException ; 106 107 118 Key[] selectMisfiredTriggersInState(Connection conn, String state, 119 long ts) throws SQLException ; 120 121 136 boolean selectMisfiredTriggersInStates(Connection conn, String state1, String state2, 137 long ts, int count, List resultList) throws SQLException ; 138 139 147 int countMisfiredTriggersInStates( 148 Connection conn, String state1, String state2, long ts) throws SQLException ; 149 150 161 Key[] selectMisfiredTriggersInGroupInState(Connection conn, 162 String groupName, String state, long ts) throws SQLException ; 163 164 165 186 Trigger[] selectTriggersForRecoveringJobs(Connection conn) 187 throws SQLException , IOException , ClassNotFoundException ; 188 189 198 int deleteFiredTriggers(Connection conn) throws SQLException ; 199 200 209 int deleteFiredTriggers(Connection conn, String instanceId) 210 throws SQLException ; 211 212 221 int deleteVolatileFiredTriggers(Connection conn) throws SQLException ; 222 223 233 Key[] selectVolatileTriggers(Connection conn) throws SQLException ; 234 235 245 Key[] selectVolatileJobs(Connection conn) throws SQLException ; 246 247 251 264 int insertJobDetail(Connection conn, JobDetail job) 265 throws IOException , SQLException ; 266 267 280 int updateJobDetail(Connection conn, JobDetail job) 281 throws IOException , SQLException ; 282 283 297 Key[] selectTriggerNamesForJob(Connection conn, String jobName, 298 String groupName) throws SQLException ; 299 300 313 int deleteJobListeners(Connection conn, String jobName, 314 String groupName) throws SQLException ; 315 316 329 int deleteJobDetail(Connection conn, String jobName, String groupName) 330 throws SQLException ; 331 332 345 boolean isJobStateful(Connection conn, String jobName, 346 String groupName) throws SQLException ; 347 348 361 boolean jobExists(Connection conn, String jobName, String groupName) 362 throws SQLException ; 363 364 377 int updateJobData(Connection conn, JobDetail job) 378 throws IOException , SQLException ; 379 380 393 int insertJobListener(Connection conn, JobDetail job, String listener) 394 throws SQLException ; 395 396 409 String [] selectJobListeners(Connection conn, String jobName, 410 String groupName) throws SQLException ; 411 412 430 JobDetail selectJobDetail(Connection conn, String jobName, 431 String groupName, ClassLoadHelper loadHelper) 432 throws ClassNotFoundException , IOException , SQLException ; 433 434 443 int selectNumJobs(Connection conn) throws SQLException ; 444 445 454 String [] selectJobGroups(Connection conn) throws SQLException ; 455 456 467 String [] selectJobsInGroup(Connection conn, String groupName) 468 throws SQLException ; 469 470 474 487 int insertTrigger(Connection conn, Trigger trigger, String state, 488 JobDetail jobDetail) throws SQLException , IOException ; 489 490 501 int insertSimpleTrigger(Connection conn, SimpleTrigger trigger) 502 throws SQLException ; 503 504 515 int insertBlobTrigger(Connection conn, Trigger trigger) 516 throws SQLException , IOException ; 517 518 529 int insertCronTrigger(Connection conn, CronTrigger trigger) 530 throws SQLException ; 531 532 545 int updateTrigger(Connection conn, Trigger trigger, String state, 546 JobDetail jobDetail) throws SQLException , IOException ; 547 548 559 int updateSimpleTrigger(Connection conn, SimpleTrigger trigger) 560 throws SQLException ; 561 562 573 int updateCronTrigger(Connection conn, CronTrigger trigger) 574 throws SQLException ; 575 576 587 int updateBlobTrigger(Connection conn, Trigger trigger) 588 throws SQLException , IOException ; 589 590 603 boolean triggerExists(Connection conn, String triggerName, 604 String groupName) throws SQLException ; 605 606 621 int updateTriggerState(Connection conn, String triggerName, 622 String groupName, String state) throws SQLException ; 623 624 643 int updateTriggerStateFromOtherState(Connection conn, 644 String triggerName, String groupName, String newState, 645 String oldState) throws SQLException ; 646 647 670 int updateTriggerStateFromOtherStates(Connection conn, 671 String triggerName, String groupName, String newState, 672 String oldState1, String oldState2, String oldState3) 673 throws SQLException ; 674 675 694 int updateTriggerStateFromOtherStatesBeforeTime(Connection conn, 695 String newState, String oldState1, String oldState2, long time) 696 throws SQLException ; 697 698 719 int updateTriggerGroupStateFromOtherStates(Connection conn, 720 String groupName, String newState, String oldState1, 721 String oldState2, String oldState3) throws SQLException ; 722 723 740 int updateTriggerGroupStateFromOtherState(Connection conn, 741 String groupName, String newState, String oldState) 742 throws SQLException ; 743 744 759 int updateTriggerStatesForJob(Connection conn, String jobName, 760 String groupName, String state) throws SQLException ; 761 762 780 int updateTriggerStatesForJobFromOtherState(Connection conn, 781 String jobName, String groupName, String state, String oldState) 782 throws SQLException ; 783 784 797 int deleteTriggerListeners(Connection conn, String triggerName, 798 String groupName) throws SQLException ; 799 800 813 int insertTriggerListener(Connection conn, Trigger trigger, 814 String listener) throws SQLException ; 815 816 829 String [] selectTriggerListeners(Connection conn, String triggerName, 830 String groupName) throws SQLException ; 831 832 845 int deleteSimpleTrigger(Connection conn, String triggerName, 846 String groupName) throws SQLException ; 847 848 861 int deleteBlobTrigger(Connection conn, String triggerName, 862 String groupName) throws SQLException ; 863 864 877 int deleteCronTrigger(Connection conn, String triggerName, 878 String groupName) throws SQLException ; 879 880 893 int deleteTrigger(Connection conn, String triggerName, 894 String groupName) throws SQLException ; 895 896 909 int selectNumTriggersForJob(Connection conn, String jobName, 910 String groupName) throws SQLException ; 911 912 926 JobDetail selectJobForTrigger(Connection conn, String triggerName, 927 String groupName, ClassLoadHelper loadHelper) 928 throws ClassNotFoundException , SQLException ; 929 930 942 List selectStatefulJobsOfTriggerGroup(Connection conn, 943 String groupName) throws SQLException ; 944 945 960 Trigger[] selectTriggersForJob(Connection conn, String jobName, 961 String groupName) throws SQLException , ClassNotFoundException , 962 IOException ; 963 964 977 Trigger[] selectTriggersForCalendar(Connection conn, String calName) 978 throws SQLException , ClassNotFoundException , IOException ; 979 992 Trigger selectTrigger(Connection conn, String triggerName, 993 String groupName) throws SQLException , ClassNotFoundException , 994 IOException ; 995 996 1010 JobDataMap selectTriggerJobDataMap(Connection conn, String triggerName, 1011 String groupName) throws SQLException , ClassNotFoundException , 1012 IOException ; 1013 1014 1027 String selectTriggerState(Connection conn, String triggerName, 1028 String groupName) throws SQLException ; 1029 1030 1043 TriggerStatus selectTriggerStatus(Connection conn, 1044 String triggerName, String groupName) throws SQLException ; 1045 1046 1055 int selectNumTriggers(Connection conn) throws SQLException ; 1056 1057 1066 String [] selectTriggerGroups(Connection conn) throws SQLException ; 1067 1068 1079 String [] selectTriggersInGroup(Connection conn, String groupName) 1080 throws SQLException ; 1081 1082 1093 Key[] selectTriggersInState(Connection conn, String state) 1094 throws SQLException ; 1095 1096 int insertPausedTriggerGroup(Connection conn, String groupName) 1097 throws SQLException ; 1098 1099 int deletePausedTriggerGroup(Connection conn, String groupName) 1100 throws SQLException ; 1101 1102 int deleteAllPausedTriggerGroups(Connection conn) 1103 throws SQLException ; 1104 1105 boolean isTriggerGroupPaused(Connection conn, String groupName) 1106 throws SQLException ; 1107 1108 Set selectPausedTriggerGroups(Connection conn) 1109 throws SQLException ; 1110 1111 boolean isExistingTriggerGroup(Connection conn, String groupName) 1112 throws SQLException ; 1113 1114 1118 1133 int insertCalendar(Connection conn, String calendarName, 1134 Calendar calendar) throws IOException , SQLException ; 1135 1136 1151 int updateCalendar(Connection conn, String calendarName, 1152 Calendar calendar) throws IOException , SQLException ; 1153 1154 1165 boolean calendarExists(Connection conn, String calendarName) 1166 throws SQLException ; 1167 1168 1184 Calendar selectCalendar(Connection conn, String calendarName) 1185 throws ClassNotFoundException , IOException , SQLException ; 1186 1187 1198 boolean calendarIsReferenced(Connection conn, String calendarName) 1199 throws SQLException ; 1200 1201 1212 int deleteCalendar(Connection conn, String calendarName) 1213 throws SQLException ; 1214 1215 1224 int selectNumCalendars(Connection conn) throws SQLException ; 1225 1226 1235 String [] selectCalendars(Connection conn) throws SQLException ; 1236 1237 1241 1252 long selectNextFireTime(Connection conn) throws SQLException ; 1253 1254 1267 Key selectTriggerForFireTime(Connection conn, long fireTime) 1268 throws SQLException ; 1269 1270 1285 Key selectTriggerToAcquire(Connection conn, long noLaterThan, long noEarlierThan) 1286 throws SQLException ; 1287 1288 1301 int insertFiredTrigger(Connection conn, Trigger trigger, 1302 String state, JobDetail jobDetail) throws SQLException ; 1303 1304 1312 List selectFiredTriggerRecords(Connection conn, String triggerName, 1313 String groupName) throws SQLException ; 1314 1315 1323 List selectFiredTriggerRecordsByJob(Connection conn, String jobName, 1324 String groupName) throws SQLException ; 1325 1326 1334 List selectInstancesFiredTriggerRecords(Connection conn, 1335 String instanceName) throws SQLException ; 1336 1337 1338 1350 Set selectFiredTriggerInstanceNames(Connection conn) 1351 throws SQLException ; 1352 1353 1364 int deleteFiredTrigger(Connection conn, String entryId) 1365 throws SQLException ; 1366 1367 1376 int selectJobExecutionCount(Connection conn, String jobName, 1377 String jobGroup) throws SQLException ; 1378 1379 1388 int insertSchedulerState(Connection conn, String instanceId, 1389 long checkInTime, long interval) 1390 throws SQLException ; 1391 1392 1401 int deleteSchedulerState(Connection conn, String instanceId) 1402 throws SQLException ; 1403 1404 1405 1414 int updateSchedulerState(Connection conn, String instanceId, long checkInTime) 1415 throws SQLException ; 1416 1417 1430 List selectSchedulerStateRecords(Connection conn, String instanceId) 1431 throws SQLException ; 1432 1433} 1434 1435 | Popular Tags |