public abstract class AbstractJobEntry extends Object implements JobEntry
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractJobEntry.ScheduleType
schedule types
|
Modifier and Type | Field and Description |
---|---|
protected static org.apache.logging.log4j.Logger |
log
Logging
|
Constructor and Description |
---|
AbstractJobEntry()
Default constructor
|
AbstractJobEntry(int sec,
int min,
int hour,
int wd,
int day_mo,
String task)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
calcRunTime()
Calculate how long before the next runtime.
|
int |
compareTo(JobEntry je)
Used for ordering Jobentries
Note: this comparator imposes orderings that are inconsistent with
equals.
|
abstract int |
getDayOfMonth()
Get the value of dayOfMonth.
|
abstract int |
getHour()
Get the value of hour.
|
abstract int |
getJobId()
Get the value of jobId.
|
abstract int |
getMinute()
Get the value of minute.
|
String |
getNextRunAsString()
Get the next runtime for this job as a String.
|
Date |
getNextRunDate()
Gets the next runtime as a date
|
long |
getNextRuntime()
Get the next runtime for this job as a long.
|
abstract int |
getSecond()
Get the value of second.
|
abstract String |
getTask()
Get the value of task.
|
abstract int |
getWeekDay()
Get the value of weekDay.
|
boolean |
isActive()
Check to see if job is currently active/running
|
void |
setActive(boolean isActive)
Sets whether the job is running.
|
abstract void |
setDayOfMonth(int v)
Set the value of dayOfMonth.
|
abstract void |
setHour(int v)
Set the value of hour.
|
abstract void |
setJobId(int v)
Set the value of jobId.
|
abstract void |
setMinute(int v)
Set the value of minute.
|
abstract void |
setSecond(int v)
Set the value of second.
|
abstract void |
setTask(String v)
Set the value of task.
|
abstract void |
setWeekDay(int v)
Set the value of weekDay.
|
protected static final org.apache.logging.log4j.Logger log
public AbstractJobEntry()
public AbstractJobEntry(int sec, int min, int hour, int wd, int day_mo, String task) throws TurbineException
sec
- Value for entry "seconds".min
- Value for entry "minutes".hour
- Value for entry "hours".wd
- Value for entry "week days".day_mo
- Value for entry "month days".task
- Task to execute.TurbineException
- a generic exception.public int compareTo(JobEntry je)
compareTo
in interface Comparable<JobEntry>
je
- The first JobEntry
object.int
indicating the result of the comparison.public void setActive(boolean isActive)
public boolean isActive()
public long getNextRuntime()
getNextRuntime
in interface JobEntry
public Date getNextRunDate()
getNextRunDate
in interface JobEntry
public String getNextRunAsString()
getNextRunAsString
in interface JobEntry
public void calcRunTime() throws TurbineException
calcRunTime
in interface JobEntry
TurbineException
- a generic exception.public abstract int getJobId()
public abstract void setJobId(int v)
public abstract int getSecond()
public abstract void setSecond(int v)
v
- new valuepublic abstract int getMinute()
public abstract void setMinute(int v)
v
- new valuepublic abstract int getHour()
public abstract void setHour(int v)
v
- new valuepublic abstract int getWeekDay()
public abstract void setWeekDay(int v)
v
- new valuepublic abstract int getDayOfMonth()
public abstract void setDayOfMonth(int v)
v
- new valueCopyright © 2000–2019 The Apache Software Foundation. All rights reserved.