1 17 18 21 package org.quartz.spi; 22 23 import java.util.Set ; 24 25 import org.quartz.Calendar; 26 import org.quartz.JobDetail; 27 import org.quartz.JobPersistenceException; 28 import org.quartz.ObjectAlreadyExistsException; 29 import org.quartz.SchedulerConfigException; 30 import org.quartz.SchedulerException; 31 import org.quartz.Trigger; 32 import org.quartz.core.SchedulingContext; 33 34 56 public interface JobStore { 57 58 65 66 72 void initialize(ClassLoadHelper loadHelper, 73 SchedulerSignaler signaler) throws SchedulerConfigException; 74 75 81 void schedulerStarted() throws SchedulerException ; 82 83 90 void shutdown(); 91 92 boolean supportsPersistence(); 93 94 100 113 void storeJobAndTrigger(SchedulingContext ctxt, JobDetail newJob, 114 Trigger newTrigger) throws ObjectAlreadyExistsException, 115 JobPersistenceException; 116 117 132 void storeJob(SchedulingContext ctxt, JobDetail newJob, 133 boolean replaceExisting) throws ObjectAlreadyExistsException, 134 JobPersistenceException; 135 136 156 boolean removeJob(SchedulingContext ctxt, String jobName, 157 String groupName) throws JobPersistenceException; 158 159 171 JobDetail retrieveJob(SchedulingContext ctxt, String jobName, 172 String groupName) throws JobPersistenceException; 173 174 191 void storeTrigger(SchedulingContext ctxt, Trigger newTrigger, 192 boolean replaceExisting) throws ObjectAlreadyExistsException, 193 JobPersistenceException; 194 195 220 boolean removeTrigger(SchedulingContext ctxt, String triggerName, 221 String groupName) throws JobPersistenceException; 222 223 239 boolean replaceTrigger(SchedulingContext ctxt, String triggerName, 240 String groupName, Trigger newTrigger) throws JobPersistenceException; 241 242 243 255 Trigger retrieveTrigger(SchedulingContext ctxt, String triggerName, 256 String groupName) throws JobPersistenceException; 257 258 278 void storeCalendar(SchedulingContext ctxt, String name, 279 Calendar calendar, boolean replaceExisting, boolean updateTriggers) 280 throws ObjectAlreadyExistsException, JobPersistenceException; 281 282 297 boolean removeCalendar(SchedulingContext ctxt, String calName) 298 throws JobPersistenceException; 299 300 310 Calendar retrieveCalendar(SchedulingContext ctxt, String calName) 311 throws JobPersistenceException; 312 313 319 325 int getNumberOfJobs(SchedulingContext ctxt) 326 throws JobPersistenceException; 327 328 334 int getNumberOfTriggers(SchedulingContext ctxt) 335 throws JobPersistenceException; 336 337 343 int getNumberOfCalendars(SchedulingContext ctxt) 344 throws JobPersistenceException; 345 346 357 String [] getJobNames(SchedulingContext ctxt, String groupName) 358 throws JobPersistenceException; 359 360 371 String [] getTriggerNames(SchedulingContext ctxt, String groupName) 372 throws JobPersistenceException; 373 374 385 String [] getJobGroupNames(SchedulingContext ctxt) 386 throws JobPersistenceException; 387 388 399 String [] getTriggerGroupNames(SchedulingContext ctxt) 400 throws JobPersistenceException; 401 402 413 String [] getCalendarNames(SchedulingContext ctxt) 414 throws JobPersistenceException; 415 416 425 Trigger[] getTriggersForJob(SchedulingContext ctxt, String jobName, 426 String groupName) throws JobPersistenceException; 427 428 439 int getTriggerState(SchedulingContext ctxt, String triggerName, 440 String triggerGroup) throws JobPersistenceException; 441 442 448 455 void pauseTrigger(SchedulingContext ctxt, String triggerName, 456 String groupName) throws JobPersistenceException; 457 458 473 void pauseTriggerGroup(SchedulingContext ctxt, String groupName) 474 throws JobPersistenceException; 475 476 484 void pauseJob(SchedulingContext ctxt, String jobName, 485 String groupName) throws JobPersistenceException; 486 487 501 void pauseJobGroup(SchedulingContext ctxt, String groupName) 502 throws JobPersistenceException; 503 504 517 void resumeTrigger(SchedulingContext ctxt, String triggerName, 518 String groupName) throws JobPersistenceException; 519 520 533 void resumeTriggerGroup(SchedulingContext ctxt, String groupName) 534 throws JobPersistenceException; 535 536 Set getPausedTriggerGroups(SchedulingContext ctxt) 537 throws JobPersistenceException; 538 539 540 554 void resumeJob(SchedulingContext ctxt, String jobName, 555 String groupName) throws JobPersistenceException; 556 557 571 void resumeJobGroup(SchedulingContext ctxt, String groupName) 572 throws JobPersistenceException; 573 574 588 void pauseAll(SchedulingContext ctxt) throws JobPersistenceException; 589 590 603 void resumeAll(SchedulingContext ctxt) 604 throws JobPersistenceException; 605 606 612 623 Trigger acquireNextTrigger(SchedulingContext ctxt, long noLaterThan) 624 throws JobPersistenceException; 625 626 633 void releaseAcquiredTrigger(SchedulingContext ctxt, Trigger trigger) 634 throws JobPersistenceException; 635 636 647 TriggerFiredBundle triggerFired(SchedulingContext ctxt, 648 Trigger trigger) throws JobPersistenceException; 649 650 660 void triggeredJobComplete(SchedulingContext ctxt, Trigger trigger, 661 JobDetail jobDetail, int triggerInstCode) 662 throws JobPersistenceException; 663 664 } 665 | Popular Tags |