org.qi4j.library.scheduler.timeline
Class TimelineService.Mixin

java.lang.Object
  extended by org.qi4j.library.scheduler.timeline.TimelineService.Mixin
All Implemented Interfaces:
Timeline
Enclosing interface:
TimelineService

public abstract static class TimelineService.Mixin
extends Object
implements Timeline

WARN TimelineService Mixin use SortedSets to keep records ordered and repeatedly search for the next run. Could be greedy with large intervals


Constructor Summary
TimelineService.Mixin()
           
 
Method Summary
 Iterable<TimelineRecord> getLastRecords(int maxResults)
           
 Iterable<TimelineRecord> getNextRecords(int maxResults)
           
 Iterable<TimelineRecord> getRecords(Date from, Date to)
           
 Iterable<TimelineRecord> getRecords(long from, long to)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimelineService.Mixin

public TimelineService.Mixin()
Method Detail

getLastRecords

public Iterable<TimelineRecord> getLastRecords(int maxResults)
Specified by:
getLastRecords in interface Timeline
Parameters:
maxResults - Maximum number of TimelineRecord to compute
Returns:
Last past records

getNextRecords

public Iterable<TimelineRecord> getNextRecords(int maxResults)
Specified by:
getNextRecords in interface Timeline
Parameters:
maxResults - Maximum number of TimelineRecord to compute
Returns:
Next running or future records

getRecords

public Iterable<TimelineRecord> getRecords(Date from,
                                           Date to)
Specified by:
getRecords in interface Timeline
Parameters:
from - Lower limit
to - Upper limit
Returns:
Records between the given dates

getRecords

public Iterable<TimelineRecord> getRecords(long from,
                                           long to)
Specified by:
getRecords in interface Timeline
Parameters:
from - Lower limit
to - Upper limit
Returns:
Records between the given dates