Package 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 basedGlobalSchedulerService
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 Description static class
QuartzSchedulerService.GlobalQuartzJobHandle
static class
QuartzSchedulerService.InmemoryTimerJobInstanceDelegate
static class
QuartzSchedulerService.QuartzJob
-
Constructor Summary
Constructors Constructor Description QuartzSchedulerService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.drools.core.time.JobHandle
buildJobHandleForContext(NamedJobContext ctx)
Builds JobHandle based on NamedJobContextvoid
forceShutdown()
void
initScheduler(org.drools.core.time.TimerService timerService)
Provides handle to inject timerService that owns this scheduler service and initialize itvoid
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 jobsorg.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 instancesvoid
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
-
Methods inherited from interface org.jbpm.process.core.timer.GlobalSchedulerService
getTimerJobInstance, invalidate
-
-
-
-
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 interfaceorg.drools.core.time.SchedulerService
-
removeJob
public boolean removeJob(org.drools.core.time.JobHandle jobHandle)
- Specified by:
removeJob
in interfaceorg.drools.core.time.SchedulerService
-
internalSchedule
public void internalSchedule(org.drools.core.time.impl.TimerJobInstance timerJobInstance)
- Specified by:
internalSchedule
in interfaceorg.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 interfaceGlobalSchedulerService
- 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 interfaceGlobalSchedulerService
-
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 interfaceGlobalSchedulerService
- 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 interfaceGlobalSchedulerService
- 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 interfaceGlobalSchedulerService
-
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 interfaceGlobalSchedulerService
- 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 interfaceGlobalSchedulerService
- Returns:
-
-