public class TimeWindows
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ALATE |
static int |
BLACKEXCEPTION |
static int |
BLACKOUT |
int |
defaultStatus |
static int |
DISABLED |
static int |
ELATE |
static int |
EXCEPTION |
static int |
EXPIRED |
static int[] |
monthDayMask |
static int[] |
monthMask |
static int |
NORMAL |
static int |
OCCURRED |
static int |
SLATE |
static java.lang.String[] |
STATUS_TEXT |
static int[] |
weekDayMask |
Constructor and Description |
---|
TimeWindows(java.util.Map props) |
Modifier and Type | Method and Description |
---|---|
int |
check(long currentTime,
long sampleTime) |
long |
getBaseTime() |
int[] |
getCurrentThreshold(long currentTime)
It returns copy of the active threshold in millisec for the given time
or null if it is blackout or expired.
|
static long[] |
getDSTInfo(int year)
return tripplet of DST info: dstStart, dstEnd, dstOffset
|
static long[] |
getDSTInfo(int year,
java.util.TimeZone zone)
return tripplet of DST info: dstStart, dstEnd, dstOffset
|
long |
getStartTime() |
long |
getStopTime() |
int |
getThresholdLength()
It returns 0 for no threshold defined, 1 for occurred thresholds or
2 and above for lateness thresholds.
|
java.util.Calendar |
getToday() |
java.util.Calendar |
getYesterday() |
boolean |
isActive(java.util.Calendar day) |
void |
list() |
static int[] |
parseInterval(java.lang.String intervalStr) |
static int[] |
parseThreshold(java.lang.String thresholdStr) |
static int |
parseTimeString(java.lang.String timeStr) |
void |
setStartTime(long tm) |
void |
setStopTime(long tm) |
public static final int EXCEPTION
public static final int BLACKEXCEPTION
public static final int DISABLED
public static final int BLACKOUT
public static final int NORMAL
public static final int OCCURRED
public static final int SLATE
public static final int ALATE
public static final int ELATE
public static final int EXPIRED
public static final java.lang.String[] STATUS_TEXT
public static final int[] weekDayMask
public static final int[] monthDayMask
public static final int[] monthMask
public int defaultStatus
public boolean isActive(java.util.Calendar day)
public int getThresholdLength()
public int[] getCurrentThreshold(long currentTime)
public int check(long currentTime, long sampleTime)
public static int parseTimeString(java.lang.String timeStr)
public static int[] parseInterval(java.lang.String intervalStr)
public static int[] parseThreshold(java.lang.String thresholdStr)
public java.util.Calendar getToday()
public java.util.Calendar getYesterday()
public long getBaseTime()
public void list()
public static long[] getDSTInfo(int year)
public long getStartTime()
public long getStopTime()
public void setStartTime(long tm)
public void setStopTime(long tm)
public static long[] getDSTInfo(int year, java.util.TimeZone zone)