|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.harvester.datamodel.Frequency
dk.netarkivet.harvester.datamodel.MinuteFrequency
public class MinuteFrequency
Allows specification of a schedule with a frequency measured in minutes. This is an "anyTime" frequency, meaning that only the frequency of of the scheduling is specified, without any constraint on the actual walltime. (This is because the additional constraints don't make sense for minute frequencies. E.g. you can have a frequency "Every day at 6pm" but how would you complete "Every 17 minutes at ???"?)
Constructor Summary | |
---|---|
MinuteFrequency(int numMinutes)
Constructor specifying the number of minutes between runs scheduled with this frequency. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Autogenerated equals. |
java.util.Date |
getFirstEvent(java.util.Date startTime)
As this is an "anyTime" frequency, this method just returns its argument (so long as it is not null). |
java.util.Date |
getNextEvent(java.util.Date lastEvent)
This method returns the time of the next event, which is just the value of lastEvent+(numMinutes)Minutes |
java.lang.Integer |
getOnDayOfMonth()
Return the exact day of month event should happen on, or null if this is an anyTime event or doesn't define what day of month it should happen on. |
java.lang.Integer |
getOnDayOfWeek()
Return the exact day of week event should happen on, or null if this is an anyTime event or doesn't define what day of week it should happen on. |
java.lang.Integer |
getOnHour()
Return the exact hour event should happen on, or null if this is an anyTime event or doesn't define what hour it should happen on. |
java.lang.Integer |
getOnMinute()
Return the exact minute event should happen on, or null if this is an anyTime event or doesn't define what minute it should happen on. |
int |
hashCode()
Autogenerated hashcode method. |
int |
ordinal()
Return an integer that can be used to identify the kind of frequency. |
Methods inherited from class dk.netarkivet.harvester.datamodel.Frequency |
---|
getNewInstance, getNumUnits, isAnytime |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MinuteFrequency(int numMinutes)
numMinutes
- Method Detail |
---|
public java.util.Date getNextEvent(java.util.Date lastEvent)
getNextEvent
in class Frequency
lastEvent
- A time from which the next event should be calculated.
ArgumentNotValid
- if lastEvent is null.public java.util.Date getFirstEvent(java.util.Date startTime)
getFirstEvent
in class Frequency
startTime
- The earliest time the event can happen.
ArgumentNotValid
- if startTime is null.public java.lang.Integer getOnMinute()
Frequency
getOnMinute
in class Frequency
public java.lang.Integer getOnHour()
Frequency
getOnHour
in class Frequency
public java.lang.Integer getOnDayOfWeek()
Frequency
getOnDayOfWeek
in class Frequency
public java.lang.Integer getOnDayOfMonth()
Frequency
getOnDayOfMonth
in class Frequency
public int ordinal()
Frequency
ordinal
in class Frequency
public boolean equals(java.lang.Object o)
Frequency
equals
in class Frequency
o
- The object to compare with
public int hashCode()
Frequency
hashCode
in class Frequency
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |