public class CronEntry extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
CronEntry.Type |
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
ALL |
protected int |
count |
protected String |
cronTime |
protected int |
lastCost |
protected Date |
lastRun |
protected long |
maxDuration |
| Constructor and Description |
|---|
CronEntry(String id,
String cronTime,
String name,
String className,
String configuration) |
CronEntry(String id,
String cronTime,
String name,
String className,
String configuration,
CronEntry.Type type) |
CronEntry(String id,
String cronTime,
String name,
String className,
String configuration,
CronEntry.Type type,
Pattern servers) |
CronEntry(String id,
String cronTime,
String name,
String className,
String configuration,
String typeString) |
CronEntry(String id,
String cronTime,
String name,
String className,
String configuration,
String typeString,
Pattern servers) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Two CronEntrys as considered equal if they have the same id, name, classname, cronTime and configuration.
|
String |
getClassName() |
String |
getConfiguration() |
int |
getCount() |
String |
getCronTime() |
CronEntryField |
getDayOfMonthEntry() |
CronEntryField |
getDayOfWeekEntry() |
(package private) Interruptable |
getExecutable() |
CronEntryField |
getHourEntry() |
String |
getId() |
int |
getLastCost() |
Date |
getLastRun() |
long |
getMaxDuration() |
CronEntryField |
getMinuteEntry() |
CronEntryField |
getMonthEntry() |
String |
getName() |
String |
getServers()
A String indicating on the servers on which this Job must run.
|
Interruptable |
getThread(int i) |
List<Interruptable> |
getThreads() |
CronEntry.Type |
getType() |
int |
hashCode() |
protected void |
incCount() |
void |
init() |
boolean |
interrupt(int thread) |
boolean |
isActive()
Whether this Entry would run.
|
boolean |
isAlive() |
boolean |
isAlive(int i)
Whether a job associated with this cron entry is currently alive on this machine.
|
boolean |
isMustBeOne() |
boolean |
kick(Date currentTime) |
(package private) boolean |
mustRun(Date date) |
void |
setConfiguration(String conf) |
protected void |
setCronTime(String cronTime) |
protected void |
setLastCost(int s) |
protected void |
setLastRun(Date d) |
void |
stop() |
String |
toString() |
public static final Pattern ALL
protected final String cronTime
protected Date lastRun
protected int count
protected int lastCost
protected long maxDuration
public CronEntry(String id, String cronTime, String name, String className, String configuration) throws Exception
Exceptionpublic CronEntry(String id, String cronTime, String name, String className, String configuration, String typeString) throws Exception
Exceptionpublic CronEntry(String id, String cronTime, String name, String className, String configuration, String typeString, Pattern servers) throws Exception
Exceptionpublic CronEntry(String id, String cronTime, String name, String className, String configuration, CronEntry.Type type) throws Exception
ClassCastException - if className does not refer to a Runnable.RuntimeException - if the cronTime format isn't correctExceptionpublic CronEntry(String id, String cronTime, String name, String className, String configuration, CronEntry.Type type, Pattern servers) throws Exception
ClassCastException - if className does not refer to a Runnable.RuntimeException - if the cronTime format isn't correctExceptionpublic void init()
public void stop()
public Interruptable getThread(int i)
public List<Interruptable> getThreads()
public boolean interrupt(int thread)
public boolean isAlive(int i)
public boolean isAlive()
public boolean isActive()
public boolean isMustBeOne()
public String getServers()
isActive(), but this is not required.Interruptable getExecutable()
public boolean kick(Date currentTime)
protected void setCronTime(String cronTime)
public String getCronTime()
public String getId()
public String getName()
public void setConfiguration(String conf)
public String getConfiguration()
public CronEntry.Type getType()
public String getClassName()
public Date getLastRun()
protected void setLastRun(Date d)
public int getCount()
protected void incCount()
public int getLastCost()
protected void setLastCost(int s)
public long getMaxDuration()
boolean mustRun(Date date)
public CronEntryField getMinuteEntry()
public CronEntryField getHourEntry()
public CronEntryField getDayOfMonthEntry()
public CronEntryField getMonthEntry()
public CronEntryField getDayOfWeekEntry()
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}