org.jbpm.process.core.timer.impl

## Class QuartzSchedulerService

- java.lang.Object
- - org.jbpm.process.core.timer.impl.QuartzSchedulerService

- All Implemented Interfaces:
    org.drools.core.time.InternalSchedulerService, org.drools.core.time.SchedulerService, GlobalSchedulerService

      public class QuartzSchedulerService
      extends Object
      implements GlobalSchedulerService

  Quartz based `GlobalSchedulerService` that is configured according to Quartz rules and allows to store jobs in data base. With that it survives server crashes and operates as soon as service is initialized without session being active.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `QuartzSchedulerService.GlobalQuartzJobHandle`
    `static class` | `QuartzSchedulerService.InmemoryTimerJobInstanceDelegate`
    `static class` | `QuartzSchedulerService.QuartzJob`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `QuartzSchedulerService()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.drools.core.time.JobHandle` | `buildJobHandleForContext(NamedJobContext ctx)` Builds JobHandle based on NamedJobContext
    `void` | `forceShutdown()`
    `void` | `initScheduler(org.drools.core.time.TimerService timerService)` Provides handle to inject timerService that owns this scheduler service and initialize it
    `void` | `internalSchedule(org.drools.core.time.impl.TimerJobInstance timerJobInstance)`
    `boolean` | `isTransactional()` Indicates if given implementation of scheduler service supports transactional timer store.
    `boolean` | `isValid(GlobalTimerService.GlobalJobHandle jobHandle)` Verifies if given job is still valid or it was already executed/vetoed.
    `boolean` | `removeJob(org.drools.core.time.JobHandle jobHandle)`
    `boolean` | `retryEnabled()` Indicates if given implementation of scheduler service supports retries of failed timer jobs
    `org.drools.core.time.JobHandle` | `scheduleJob(org.drools.core.time.Job job, org.drools.core.time.JobContext ctx, org.drools.core.time.Trigger trigger)`
    `void` | `setInterceptor(SchedulerServiceInterceptor interceptor)` Allows to set interceptor that will be used to schedule timer instances
    `void` | `shutdown()` Allows to shutdown the scheduler service

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### QuartzSchedulerService

          public QuartzSchedulerService()

  - ### Method Detail

    - #### scheduleJob

          public org.drools.core.time.JobHandle scheduleJob(org.drools.core.time.Job job,
                                                            org.drools.core.time.JobContext ctx,
                                                            org.drools.core.time.Trigger trigger)

      Specified by:
        `scheduleJob` in interface `org.drools.core.time.SchedulerService`

    - #### removeJob

          public boolean removeJob(org.drools.core.time.JobHandle jobHandle)

      Specified by:
        `removeJob` in interface `org.drools.core.time.SchedulerService`

    - #### internalSchedule

          public void internalSchedule(org.drools.core.time.impl.TimerJobInstance timerJobInstance)

      Specified by:
        `internalSchedule` in interface `org.drools.core.time.InternalSchedulerService`

    - #### initScheduler

          public void initScheduler(org.drools.core.time.TimerService timerService)

      Description copied from interface: `GlobalSchedulerService`
      Provides handle to inject timerService that owns this scheduler service and initialize it
      Specified by:
        `initScheduler` in interface `GlobalSchedulerService`
      Parameters:
        `timerService` - owner of this scheduler service

    - #### shutdown

          public void shutdown()

      Description copied from interface: `GlobalSchedulerService`
      Allows to shutdown the scheduler service
      Specified by:
        `shutdown` in interface `GlobalSchedulerService`

    - #### forceShutdown

          public void forceShutdown()

    - #### buildJobHandleForContext

          public org.drools.core.time.JobHandle buildJobHandleForContext(NamedJobContext ctx)

      Description copied from interface: `GlobalSchedulerService`
      Builds JobHandle based on NamedJobContext
      Specified by:
        `buildJobHandleForContext` in interface `GlobalSchedulerService`
      Returns:

    - #### isTransactional

          public boolean isTransactional()

      Description copied from interface: `GlobalSchedulerService`
      Indicates if given implementation of scheduler service supports transactional timer store.
      Specified by:
        `isTransactional` in interface `GlobalSchedulerService`
      Returns:

    - #### setInterceptor

          public void setInterceptor(SchedulerServiceInterceptor interceptor)

      Description copied from interface: `GlobalSchedulerService`
      Allows to set interceptor that will be used to schedule timer instances
      Specified by:
        `setInterceptor` in interface `GlobalSchedulerService`

    - #### retryEnabled

          public boolean retryEnabled()

      Description copied from interface: `GlobalSchedulerService`
      Indicates if given implementation of scheduler service supports retries of failed timer jobs
      Specified by:
        `retryEnabled` in interface `GlobalSchedulerService`
      Returns:

    - #### isValid

          public boolean isValid(GlobalTimerService.GlobalJobHandle jobHandle)

      Description copied from interface: `GlobalSchedulerService`
      Verifies if given job is still valid or it was already executed/vetoed. Especially important in multi node environments - cluster.
      Specified by:
        `isValid` in interface `GlobalSchedulerService`
      Returns:

Copyright © 2001–2021 JBoss by Red Hat. All rights reserved.