public class AbstractSoftScheduler<E extends TimeIntervalEntry> extends java.lang.Object implements TimeIntervalScheduler<E>
TimeIntervalScheduler.ScheduleType| Constructor and Description |
|---|
AbstractSoftScheduler(long clockTic)
Creates a mamp of TimeIntervals of the requested size.
|
AbstractSoftScheduler(long clockTic,
TimeIntervalScheduler.ScheduleType scheduleType)
Creates a mamp of TimeIntervals of the requested size.
|
| Modifier and Type | Method and Description |
|---|---|
TimeInterval |
getSchedulerInterval(long time)
Returns the schedule interval for the designated time.
|
TimeInterval |
getSchedulerInterval(long time,
long interavalDuration)
Returns the TimeInterval containing the moment, based on a schedule
of
|
void |
schedule(E entry)
Schedules the entry to the current interval of the map.
|
void |
schedule(E entry,
long time)
Schedules an entry to the map's interval for time time
|
void |
schedule(E entry,
TimeInterval timeInterval)
The event will be scheduled to ocuur anytime within the designated
time interval.
|
int |
scheduleSize(long time)
Returns the size of the queue for the specified time.
|
int |
size()
Returns the number of distinct time intervals held by the schedule.
|
java.lang.String |
toString() |
public AbstractSoftScheduler(long clockTic)
clockTic - public AbstractSoftScheduler(long clockTic,
TimeIntervalScheduler.ScheduleType scheduleType)
clockTic - public final void schedule(E entry)
schedule in interface TimeIntervalScheduler<E extends TimeIntervalEntry>public final void schedule(E entry, long time)
schedule in interface TimeIntervalScheduler<E extends TimeIntervalEntry>entry - time - public final void schedule(E entry, TimeInterval timeInterval)
schedule in interface TimeIntervalScheduler<E extends TimeIntervalEntry>entry - to add to the scheduletimeInterval - during which the entry may be scheduledpublic final TimeInterval getSchedulerInterval(long time)
getSchedulerInterval in interface TimeIntervalScheduler<E extends TimeIntervalEntry>time - within the intervalpublic final TimeInterval getSchedulerInterval(long time, long interavalDuration)
getSchedulerInterval in interface TimeIntervalScheduler<E extends TimeIntervalEntry>time - interavalDuration - public int size()
public int scheduleSize(long time)
public java.lang.String toString()
toString in class java.lang.Object