|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ijsberg.iglu.util.time.TimeSupport
org.ijsberg.iglu.util.time.SchedulingSupport
public class SchedulingSupport
| Field Summary |
|---|
| Fields inherited from class org.ijsberg.iglu.util.time.TimeSupport |
|---|
DAY_IN_MINS, DAY_IN_MS, HALF_MINUTE_IN_MS, HOUR_IN_MS, LOCAL_UTC_OFFSET, LOCAL_UTC_OFFSET_IN_MINUTES, MINUTE_IN_MS, SECOND_IN_MS |
| Constructor Summary | |
|---|---|
SchedulingSupport()
|
|
| Method Summary | |
|---|---|
static long |
calculateOffsetInMs(int intervalInMinutes,
int offsetInMinutes)
Reformulates negative offsets or offsets larger than interval. |
static int |
getIntervalsSinceMidnight(long time,
int intervalInMinutes)
|
static long |
getNextIntervalStart(long time,
int intervalInMinutes)
Determines the exact time the next interval starts based on a time within the current interval. |
static long |
getNextIntervalStart(long time,
int intervalInMinutes,
int offsetInMinutes)
Determines the exact time the next interval starts based on a time within the current interval. |
static long |
getPreviousIntervalStart(long time,
int intervalInMinutes)
Determines the exact time an interval starts based on a time within the interval. |
static long |
getPreviousIntervalStart(long time,
int intervalInMinutes,
int offsetInMinutes)
Determines the exact time an interval starts based on a time within the interval. |
static long |
getTimeTillIntervalStart(long time,
int intervalInMinutes)
|
static long |
getTimeTillIntervalStart(long time,
int intervalInMinutes,
int offsetInMinutes)
|
static boolean |
isIntervalRegularDaily(int intervalInMinutes)
|
static boolean |
isWithinMinuteOfIntervalStart(long time,
int intervalInMinutes)
|
static boolean |
isWithinMinuteOfIntervalStart(long time,
int intervalInMinutes,
int offsetInMinutes)
Useful for scheduling jobs checking every minute on the minute if an event should be triggered. |
static boolean |
isWithinSameInterval(long time1,
long time2,
int intervalInMinutes)
|
static boolean |
isWithinSameInterval(long time1,
long time2,
int intervalInMinutes,
int offsetInMinutes)
|
| Methods inherited from class org.ijsberg.iglu.util.time.TimeSupport |
|---|
getMinutesSinceMidnight, getMinutesSinceMidnight, getUtcOffset, isAfterToday, isBeforeToday, isSameDay, isSameWeek, isToday, roundToMinute |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SchedulingSupport()
| Method Detail |
|---|
public static int getIntervalsSinceMidnight(long time,
int intervalInMinutes)
time - intervalInMinutes - should be > 0
public static long getPreviousIntervalStart(long time,
int intervalInMinutes)
time - time in millisintervalInMinutes -
public static boolean isIntervalRegularDaily(int intervalInMinutes)
intervalInMinutes -
public static long calculateOffsetInMs(int intervalInMinutes,
int offsetInMinutes)
intervalInMinutes - offsetInMinutes -
public static long getPreviousIntervalStart(long time,
int intervalInMinutes,
int offsetInMinutes)
time - time in millisintervalInMinutes - offsetInMinutes -
public static long getNextIntervalStart(long time,
int intervalInMinutes)
time - time in millisintervalInMinutes -
public static long getNextIntervalStart(long time,
int intervalInMinutes,
int offsetInMinutes)
time - time in millisintervalInMinutes - offsetInMinutes -
public static boolean isWithinSameInterval(long time1,
long time2,
int intervalInMinutes)
time1 - time in millistime2 - time in millisintervalInMinutes - should be > 0
public static boolean isWithinSameInterval(long time1,
long time2,
int intervalInMinutes,
int offsetInMinutes)
time1 - time in millistime2 - time in millisintervalInMinutes - should be > 0
public static boolean isWithinMinuteOfIntervalStart(long time,
int intervalInMinutes)
intervalInMinutes -
public static boolean isWithinMinuteOfIntervalStart(long time,
int intervalInMinutes,
int offsetInMinutes)
time - intervalInMinutes - offsetInMinutes -
public static long getTimeTillIntervalStart(long time,
int intervalInMinutes)
intervalInMinutes -
public static long getTimeTillIntervalStart(long time,
int intervalInMinutes,
int offsetInMinutes)
intervalInMinutes -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||