Package org.jbpm.process.core.timer.impl
Class GlobalTimerService
- java.lang.Object
-
- org.jbpm.process.core.timer.impl.GlobalTimerService
-
- All Implemented Interfaces:
org.drools.core.time.InternalSchedulerService
,org.drools.core.time.SchedulerService
,org.drools.core.time.TimerService
public class GlobalTimerService extends Object implements org.drools.core.time.TimerService, org.drools.core.time.InternalSchedulerService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GlobalTimerService.DisposableCommandService
static class
GlobalTimerService.GlobalJobHandle
-
Field Summary
Fields Modifier and Type Field Description protected org.drools.core.time.impl.TimerJobFactoryManager
jobFactoryManager
protected org.kie.api.runtime.manager.RuntimeManager
manager
protected GlobalSchedulerService
schedulerService
protected ConcurrentSkipListSet<GlobalTimerService.GlobalJobHandle>
startTimerJobs
protected ConcurrentHashMap<Long,List<GlobalTimerService.GlobalJobHandle>>
timerJobsPerSession
-
Constructor Summary
Constructors Constructor Description GlobalTimerService(org.kie.api.runtime.manager.RuntimeManager manager, GlobalSchedulerService schedulerService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.drools.core.time.JobHandle
buildJobHandleForContext(NamedJobContext ctx)
void
clearTimerJobInstances(long id)
void
destroy()
long
getCurrentTime()
protected org.kie.api.runtime.ExecutableRunner
getRunner(Long processInstanceId, TimerManager.ProcessJobContext ctx)
org.kie.api.runtime.ExecutableRunner
getRunner(org.drools.core.time.JobContext jobContext)
org.kie.internal.runtime.manager.InternalRuntimeManager
getRuntimeManager()
org.drools.core.time.impl.TimerJobFactoryManager
getTimerJobFactoryManager()
Collection<org.drools.core.time.impl.TimerJobInstance>
getTimerJobInstances(long id)
ConcurrentHashMap<Long,List<GlobalTimerService.GlobalJobHandle>>
getTimerJobsPerSession()
String
getTimerServiceId()
long
getTimeToNextJob()
void
internalSchedule(org.drools.core.time.impl.TimerJobInstance timerJobInstance)
boolean
isTransactional()
boolean
removeJob(org.drools.core.time.JobHandle jobHandle)
void
reset()
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
setTimerJobFactoryManager(org.drools.core.time.impl.TimerJobFactoryManager timerJobFactoryManager)
void
setTimerServiceId(String timerServiceId)
void
shutdown()
-
-
-
Field Detail
-
jobFactoryManager
protected org.drools.core.time.impl.TimerJobFactoryManager jobFactoryManager
-
schedulerService
protected final GlobalSchedulerService schedulerService
-
manager
protected final org.kie.api.runtime.manager.RuntimeManager manager
-
timerJobsPerSession
protected final ConcurrentHashMap<Long,List<GlobalTimerService.GlobalJobHandle>> timerJobsPerSession
-
startTimerJobs
protected final ConcurrentSkipListSet<GlobalTimerService.GlobalJobHandle> startTimerJobs
-
-
Constructor Detail
-
GlobalTimerService
public GlobalTimerService(org.kie.api.runtime.manager.RuntimeManager manager, GlobalSchedulerService schedulerService)
-
-
Method Detail
-
isTransactional
public boolean isTransactional()
-
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
-
getCurrentTime
public long getCurrentTime()
- Specified by:
getCurrentTime
in interfaceorg.drools.core.time.TimerService
-
reset
public void reset()
- Specified by:
reset
in interfaceorg.drools.core.time.TimerService
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceorg.drools.core.time.TimerService
-
destroy
public void destroy()
-
getTimeToNextJob
public long getTimeToNextJob()
- Specified by:
getTimeToNextJob
in interfaceorg.drools.core.time.TimerService
-
getTimerJobInstances
public Collection<org.drools.core.time.impl.TimerJobInstance> getTimerJobInstances(long id)
- Specified by:
getTimerJobInstances
in interfaceorg.drools.core.time.TimerService
-
clearTimerJobInstances
public void clearTimerJobInstances(long id)
-
internalSchedule
public void internalSchedule(org.drools.core.time.impl.TimerJobInstance timerJobInstance)
- Specified by:
internalSchedule
in interfaceorg.drools.core.time.InternalSchedulerService
-
setTimerJobFactoryManager
public void setTimerJobFactoryManager(org.drools.core.time.impl.TimerJobFactoryManager timerJobFactoryManager)
- Specified by:
setTimerJobFactoryManager
in interfaceorg.drools.core.time.TimerService
-
getTimerJobFactoryManager
public org.drools.core.time.impl.TimerJobFactoryManager getTimerJobFactoryManager()
- Specified by:
getTimerJobFactoryManager
in interfaceorg.drools.core.time.TimerService
-
getRunner
public org.kie.api.runtime.ExecutableRunner getRunner(org.drools.core.time.JobContext jobContext)
-
getTimerServiceId
public String getTimerServiceId()
-
setTimerServiceId
public void setTimerServiceId(String timerServiceId)
-
buildJobHandleForContext
public org.drools.core.time.JobHandle buildJobHandleForContext(NamedJobContext ctx)
-
getRuntimeManager
public org.kie.internal.runtime.manager.InternalRuntimeManager getRuntimeManager()
-
getRunner
protected org.kie.api.runtime.ExecutableRunner getRunner(Long processInstanceId, TimerManager.ProcessJobContext ctx)
-
getTimerJobsPerSession
public ConcurrentHashMap<Long,List<GlobalTimerService.GlobalJobHandle>> getTimerJobsPerSession()
-
-