|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcdx.scorebot.net.tests.TestSchedule
public class TestSchedule
Defines when a test is to be run (how often and during what time periods). The test interval describes the number of seconds between runs. The number of repetitions is how many times to run the test each time it is scheduled (such runs will be spread out by a the specified number of seconds between repetitions).
Note: If multiple tests are being run together (multiple repetitions) then the interval specifies the amount of time between the LAST test in the current repetition and the FIRST test in the next repetition.
Field Summary | |
---|---|
static int |
DEFAULT_INTERVAL
default min/max interval |
static java.util.Random |
RAND
generates random numbers |
Constructor Summary | |
---|---|
TestSchedule()
default constructor |
Method Summary | |
---|---|
void |
addTimeRangeToRun(TimestampRange tr)
Adds a range of time during which tests will be run. |
boolean |
equals(java.lang.Object o)
|
int |
getMaxInterval()
gets max number of seconds between runs of the test |
int |
getMinInterval()
gets min number of seconds between runs of the test |
Timestamp |
getMostRecentRunTime()
gets when the test was last scheduled to run |
Timestamp |
getNextRunTime()
gets when the test is next scheduled to run |
int |
getRepetitions()
gets number of times to run the test each interval |
int |
getSecsBetweenRepetitions()
gets the number of seconds between repetitions |
java.util.Vector<TimestampRange> |
getTimeRangesToRun()
gets when to run the test (time block(s)) |
TimestampRange |
getTimeRangeToRun(int index)
Gets the specified range of time to run |
void |
initializeTimes()
initializes the mostRecentRunTime to now and the nextRunTime to some time one interval from now |
boolean |
neverAutoSchedule()
Gets whether or not the test this applies to should ever be automatically scheduled or not. |
void |
removeTimeRangeToRun(int index)
Removes the range of time from this TestSchedule |
Timestamp |
scheduleNextRunTime()
The next run time will be set as follows. |
void |
setInterval(int minInterval,
int maxInterval)
sets the interval in the number of seconds between runs of the test |
void |
setMaxInterval(int maxInterval)
sets the maximum interval in the number of seconds between runs of the test |
void |
setMinInterval(int minInterval)
sets the minimum interval in the number of seconds between runs of the test |
void |
setNeverAutoSchedule(boolean neverAutoSchedule)
Sets whether or not the test this applies to should ever be automatically scheduled or not. |
void |
setRepetitions(int repetitions)
sets number of times to run the test each interval |
void |
setSecsBetweenRepetitions(int secsBetweenRepetitions)
sets the number of seconds between repetitions |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.util.Random RAND
public static final int DEFAULT_INTERVAL
Constructor Detail |
---|
public TestSchedule()
Method Detail |
---|
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public void initializeTimes()
public Timestamp scheduleNextRunTime()
public void setMinInterval(int minInterval)
minInterval
- smallest interval between test runs allowed (in the range [1, maxInterval]public void setMaxInterval(int maxInterval)
maxInterval
- biggest interval between test runs allowed (in the range [minInterval, MAX_INTEGER)public void setInterval(int minInterval, int maxInterval)
minInterval
- smallest interval between test runs allowed (in the range [1, maxInterval]maxInterval
- biggest interval between test runs allowed (in the range [minInterval, MAX_INTEGER)public void addTimeRangeToRun(TimestampRange tr)
tr
- the TimestampRange to add to this TestSchedulepublic void removeTimeRangeToRun(int index) throws java.lang.ArrayIndexOutOfBoundsException
index
- remove the TimestampRange at the specified index.
java.lang.ArrayIndexOutOfBoundsException
- if the index was invalid.public TimestampRange getTimeRangeToRun(int index) throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
- if the index was invalid.public java.util.Vector<TimestampRange> getTimeRangesToRun()
public int getRepetitions()
public void setRepetitions(int repetitions)
public int getSecsBetweenRepetitions()
public void setSecsBetweenRepetitions(int secsBetweenRepetitions)
public int getMinInterval()
public int getMaxInterval()
public Timestamp getMostRecentRunTime()
public Timestamp getNextRunTime()
public boolean neverAutoSchedule()
public void setNeverAutoSchedule(boolean neverAutoSchedule)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |