org.drools.time
Interface TimerService

All Superinterfaces:
SchedulerService
All Known Implementing Classes:
JDKTimerService, JpaJDKTimerService, PseudoClockScheduler

public interface TimerService
extends SchedulerService

An interface for all timer service implementations used in a drools session.


Method Summary
 long getCurrentTime()
          Returns the current time from the scheduler clock
 long getTimeToNextJob()
          Returns the number of time units (usually ms) to the next scheduled job
 void shutdown()
          Shuts the service down
 
Methods inherited from interface org.drools.time.SchedulerService
removeJob, scheduleJob
 

Method Detail

getCurrentTime

long getCurrentTime()
Returns the current time from the scheduler clock

Returns:
the current timestamp

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


Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.