Package org.drools.core.time
Interface TimerService
-
- All Superinterfaces:
SchedulerService
- All Known Implementing Classes:
JDKTimerService
,PseudoClockScheduler
public interface TimerService extends SchedulerService
An interface for all timer service implementations used in a drools session.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getCurrentTime()
Returns the current time from the scheduler clockTimerJobFactoryManager
getTimerJobFactoryManager()
Collection<TimerJobInstance>
getTimerJobInstances(long id)
This method may return null for some TimerService implementations that do not want the overhead of maintain this.long
getTimeToNextJob()
Returns the number of time units (usually ms) to the next scheduled jobvoid
reset()
Reset this servicevoid
setTimerJobFactoryManager(TimerJobFactoryManager timerJobFactoryManager)
void
shutdown()
Shuts the service down-
Methods inherited from interface org.drools.core.time.SchedulerService
removeJob, scheduleJob
-
-
-
-
Method Detail
-
getCurrentTime
long getCurrentTime()
Returns the current time from the scheduler clock- Returns:
- the current timestamp
-
reset
void reset()
Reset this service
-
shutdown
void shutdown()
Shuts the service down
-
getTimeToNextJob
long getTimeToNextJob()
Returns the number of time units (usually ms) to the next scheduled job- Returns:
- the number of time units until the next scheduled job or -1 if there is no job scheduled
-
getTimerJobInstances
Collection<TimerJobInstance> getTimerJobInstances(long id)
This method may return null for some TimerService implementations that do not want the overhead of maintain this.- Returns:
-
setTimerJobFactoryManager
void setTimerJobFactoryManager(TimerJobFactoryManager timerJobFactoryManager)
-
getTimerJobFactoryManager
TimerJobFactoryManager getTimerJobFactoryManager()
-
-