Package org.jbpm.process.core.timer
Interface GlobalSchedulerService
-
- All Superinterfaces:
org.drools.core.time.InternalSchedulerService
,org.drools.core.time.SchedulerService
- All Known Implementing Classes:
QuartzSchedulerService
,ThreadPoolSchedulerService
public interface GlobalSchedulerService extends org.drools.core.time.SchedulerService, org.drools.core.time.InternalSchedulerService
Implementations of these interface are responsible for scheduled jobs in global manner, meaning not knowledge session scoped but global accessible for all the sessions that will be configured to use thisGlobalSchedulerService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description org.drools.core.time.JobHandle
buildJobHandleForContext(NamedJobContext ctx)
Builds JobHandle based on NamedJobContextdefault org.drools.core.time.impl.TimerJobInstance
getTimerJobInstance(long processInstanceId, long timerId)
void
initScheduler(org.drools.core.time.TimerService timerService)
Provides handle to inject timerService that owns this scheduler service and initialize itdefault void
invalidate(org.drools.core.time.JobHandle jobHandle)
Operations to be performed before the job is removedboolean
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
retryEnabled()
Indicates if given implementation of scheduler service supports retries of failed timer jobsvoid
setInterceptor(SchedulerServiceInterceptor interceptor)
Allows to set interceptor that will be used to schedule timer instancesvoid
shutdown()
Allows to shutdown the scheduler service
-
-
-
Method Detail
-
initScheduler
void initScheduler(org.drools.core.time.TimerService timerService)
Provides handle to inject timerService that owns this scheduler service and initialize it- Parameters:
timerService
- owner of this scheduler service
-
shutdown
void shutdown()
Allows to shutdown the scheduler service
-
buildJobHandleForContext
org.drools.core.time.JobHandle buildJobHandleForContext(NamedJobContext ctx)
Builds JobHandle based on NamedJobContext- Parameters:
ctx
-- Returns:
-
isTransactional
boolean isTransactional()
Indicates if given implementation of scheduler service supports transactional timer store.- Returns:
-
retryEnabled
boolean retryEnabled()
Indicates if given implementation of scheduler service supports retries of failed timer jobs- Returns:
-
setInterceptor
void setInterceptor(SchedulerServiceInterceptor interceptor)
Allows to set interceptor that will be used to schedule timer instances- Parameters:
interceptor
-
-
isValid
boolean isValid(GlobalTimerService.GlobalJobHandle jobHandle)
Verifies if given job is still valid or it was already executed/vetoed. Especially important in multi node environments - cluster.- Parameters:
jobHandle
-- Returns:
-
invalidate
default void invalidate(org.drools.core.time.JobHandle jobHandle)
Operations to be performed before the job is removed- Parameters:
jobHandle
- job handle being invalidated
-
getTimerJobInstance
default org.drools.core.time.impl.TimerJobInstance getTimerJobInstance(long processInstanceId, long timerId)
-
-