|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.scheduling.JPPFSchedule
public class JPPFSchedule
Instances of this class contain data used to setup a schedule. This includes duration, date, date format.
| Constructor Summary | |
|---|---|
JPPFSchedule(long duration)
Initialize this schedule configuration with the specified duration. |
|
JPPFSchedule(String date,
SimpleDateFormat dateFormat)
Deprecated. use JPPFSchedule(String, String) instead. |
|
JPPFSchedule(String date,
String format)
Initialize this schedule configuration with the specified duration. |
|
| Method Summary | |
|---|---|
String |
getDate()
Get the scheduled date for this configuration. |
SimpleDateFormat |
getDateFormat()
Deprecated. use getFormat() instead. |
long |
getDuration()
Get the duration for this configuration. |
String |
getFormat()
Get the format of timeout date for this task. |
boolean |
hasDate()
Determine whether this schedule was initialized with a date or not. |
boolean |
hasDuration()
Determine whether this schedule was initialized with a duration or not. |
Date |
toDate(long startDate)
Convert this schedule to a Date object. |
long |
toLong(long startDate)
Convert this schedule to a long value. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JPPFSchedule(long duration)
duration - the duration in milliseconds.
public JPPFSchedule(String date,
String format)
date - the schedule date provided as a string.format - the format in which the date is expressed (including locale and time zone information),
as specified in the description of SimpleDateFormat.
public JPPFSchedule(String date,
SimpleDateFormat dateFormat)
JPPFSchedule(String, String) instead.
date - the schedule date provided as a string.dateFormat - the format in which the date is expressed (including locale and time zone information).| Method Detail |
|---|
public long getDuration()
public String getDate()
public SimpleDateFormat getDateFormat()
getFormat() instead.
SimpleDateFormat instance.public String getFormat()
public Date toDate(long startDate)
throws ParseException
Date object.
startDate - the starting date to use if the schedule is expressed as a duration.
Date.
ParseException - if parsing using the simple date format fails.
public long toLong(long startDate)
throws ParseException
startDate - the starting date to use if the schedule is expressed as a duration.
ParseException - if parsing using the simple date format fails.public String toString()
toString in class Objectpublic boolean hasDate()
public boolean hasDuration()
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||