1 2 18 19 22 package org.quartz; 23 24 import java.util.Date ; 25 import java.util.List ; 26 import java.util.Set ; 27 28 import org.quartz.spi.JobFactory; 29 30 108 public interface Scheduler { 109 110 117 118 124 String DEFAULT_GROUP = "DEFAULT"; 125 126 133 String DEFAULT_MANUAL_TRIGGERS = "MANUAL_TRIGGER"; 134 135 144 String DEFAULT_RECOVERY_GROUP = "RECOVERING_JOBS"; 145 146 155 String DEFAULT_FAIL_OVER_GROUP = "FAILED_OVER_JOBS"; 156 157 158 166 String FAILED_JOB_ORIGINAL_TRIGGER_NAME = "QRTZ_FAILED_JOB_ORIG_TRIGGER_NAME"; 167 168 176 String FAILED_JOB_ORIGINAL_TRIGGER_GROUP = "QRTZ_FAILED_JOB_ORIG_TRIGGER_GROUP"; 177 178 186 String FAILED_JOB_ORIGINAL_TRIGGER_FIRETIME_IN_MILLISECONDS = "QRTZ_FAILED_JOB_ORIG_TRIGGER_FIRETIME_IN_MILLISECONDS_AS_STRING"; 187 188 189 196 197 202 String getSchedulerName() throws SchedulerException; 203 204 209 String getSchedulerInstanceId() throws SchedulerException; 210 211 216 SchedulerContext getContext() throws SchedulerException; 217 218 224 244 void start() throws SchedulerException; 245 246 260 boolean isStarted() throws SchedulerException; 261 262 282 void standby() throws SchedulerException; 283 284 288 void pause() throws SchedulerException; 289 290 298 boolean isInStandbyMode() throws SchedulerException; 299 300 304 boolean isPaused() throws SchedulerException; 305 306 319 void shutdown() throws SchedulerException; 320 321 337 void shutdown(boolean waitForJobsToComplete) 338 throws SchedulerException; 339 340 345 boolean isShutdown() throws SchedulerException; 346 347 358 SchedulerMetaData getMetaData() throws SchedulerException; 359 360 381 List getCurrentlyExecutingJobs() throws SchedulerException; 382 383 397 void setJobFactory(JobFactory factory) throws SchedulerException; 398 399 405 421 Date scheduleJob(JobDetail jobDetail, Trigger trigger) 422 throws SchedulerException; 423 424 435 Date scheduleJob(Trigger trigger) throws SchedulerException; 436 437 442 boolean unscheduleJob(String triggerName, String groupName) 443 throws SchedulerException; 444 445 463 Date rescheduleJob(String triggerName, 464 String groupName, Trigger newTrigger) throws SchedulerException; 465 466 467 485 void addJob(JobDetail jobDetail, boolean replace) 486 throws SchedulerException; 487 488 498 boolean deleteJob(String jobName, String groupName) 499 throws SchedulerException; 500 501 507 void triggerJob(String jobName, String groupName) 508 throws SchedulerException; 509 510 516 void triggerJobWithVolatileTrigger(String jobName, String groupName) 517 throws SchedulerException; 518 519 530 void triggerJob(String jobName, String groupName, JobDataMap data) 531 throws SchedulerException; 532 533 544 void triggerJobWithVolatileTrigger(String jobName, String groupName, JobDataMap data) 545 throws SchedulerException; 546 547 555 void pauseJob(String jobName, String groupName) 556 throws SchedulerException; 557 558 572 void pauseJobGroup(String groupName) throws SchedulerException; 573 574 581 void pauseTrigger(String triggerName, String groupName) 582 throws SchedulerException; 583 584 597 void pauseTriggerGroup(String groupName) throws SchedulerException; 598 599 613 void resumeJob(String jobName, String groupName) 614 throws SchedulerException; 615 616 630 void resumeJobGroup(String groupName) throws SchedulerException; 631 632 645 void resumeTrigger(String triggerName, String groupName) 646 throws SchedulerException; 647 648 661 void resumeTriggerGroup(String groupName) throws SchedulerException; 662 663 680 void pauseAll() throws SchedulerException; 681 682 695 void resumeAll() throws SchedulerException; 696 697 703 String [] getJobGroupNames() throws SchedulerException; 704 705 711 String [] getJobNames(String groupName) throws SchedulerException; 712 713 719 Trigger[] getTriggersOfJob(String jobName, String groupName) 720 throws SchedulerException; 721 722 727 String [] getTriggerGroupNames() throws SchedulerException; 728 729 735 String [] getTriggerNames(String groupName) throws SchedulerException; 736 737 742 Set getPausedTriggerGroups() throws SchedulerException; 743 744 750 JobDetail getJobDetail(String jobName, String jobGroup) 751 throws SchedulerException; 752 753 759 Trigger getTrigger(String triggerName, String triggerGroup) 760 throws SchedulerException; 761 762 774 int getTriggerState(String triggerName, String triggerGroup) 775 throws SchedulerException; 776 777 792 void addCalendar(String calName, Calendar calendar, boolean replace, boolean updateTriggers) 793 throws SchedulerException; 794 795 804 boolean deleteCalendar(String calName) throws SchedulerException; 805 806 811 Calendar getCalendar(String calName) throws SchedulerException; 812 813 818 String [] getCalendarNames() throws SchedulerException; 819 820 860 boolean interrupt(String jobName, String groupName) throws UnableToInterruptJobException; 861 862 868 879 void addGlobalJobListener(JobListener jobListener) 880 throws SchedulerException; 881 882 887 void addJobListener(JobListener jobListener) 888 throws SchedulerException; 889 890 901 boolean removeGlobalJobListener(JobListener jobListener) 902 throws SchedulerException; 903 904 913 boolean removeGlobalJobListener(String name) 914 throws SchedulerException; 915 916 925 boolean removeJobListener(String name) throws SchedulerException; 926 927 933 List getGlobalJobListeners() throws SchedulerException; 934 935 941 Set getJobListenerNames() throws SchedulerException; 942 943 949 JobListener getGlobalJobListener(String name) throws SchedulerException; 950 951 957 JobListener getJobListener(String name) throws SchedulerException; 958 959 970 void addGlobalTriggerListener(TriggerListener triggerListener) 971 throws SchedulerException; 972 973 978 void addTriggerListener(TriggerListener triggerListener) 979 throws SchedulerException; 980 981 992 boolean removeGlobalTriggerListener(TriggerListener triggerListener) 993 throws SchedulerException; 994 995 1004 boolean removeGlobalTriggerListener(String name) 1005 throws SchedulerException; 1006 1007 1008 1017 boolean removeTriggerListener(String name) throws SchedulerException; 1018 1019 1025 List getGlobalTriggerListeners() throws SchedulerException; 1026 1027 1033 Set getTriggerListenerNames() throws SchedulerException; 1034 1035 1041 TriggerListener getGlobalTriggerListener(String name) 1042 throws SchedulerException; 1043 1044 1050 TriggerListener getTriggerListener(String name) 1051 throws SchedulerException; 1052 1053 1059 void addSchedulerListener(SchedulerListener schedulerListener) 1060 throws SchedulerException; 1061 1062 1071 boolean removeSchedulerListener(SchedulerListener schedulerListener) 1072 throws SchedulerException; 1073 1074 1080 List getSchedulerListeners() throws SchedulerException; 1081 1082 1083} 1084 | Popular Tags |