public class JobEntryQuartz extends Object implements JobEntry, org.quartz.Job
QuartzScheduler
.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_JOB_GROUP_NAME
the default Quartz schedule group name for Turbine jobs
|
Constructor and Description |
---|
JobEntryQuartz()
Default constructor
|
JobEntryQuartz(org.quartz.Trigger jobTrigger)
Constructor
|
JobEntryQuartz(org.quartz.Trigger jobTrigger,
org.quartz.JobDetail jobDetail)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
calcRunTime()
Calculate how long before the next runtime.
|
int |
compareTo(JobEntry o) |
void |
execute(org.quartz.JobExecutionContext context) |
org.quartz.JobDetail |
getJobDetail() |
int |
getJobId()
Get the value of jobId.
|
org.quartz.Trigger |
getJobTrigger() |
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.
|
String |
getTask()
Get the value of task.
|
boolean |
isActive()
Check to see if job is currently active/running
|
boolean |
isNew()
Return true, if the entry is not yet persisted
|
void |
setActive(boolean isActive)
Sets whether the job is running.
|
void |
setJobId(int v)
Set the value of jobId.
|
void |
setJobTrigger(org.quartz.Trigger jobTrigger) |
void |
setTask(String v)
Set the value of task.
|
public static final String DEFAULT_JOB_GROUP_NAME
public JobEntryQuartz()
public JobEntryQuartz(org.quartz.Trigger jobTrigger)
jobTrigger
- Job time tablepublic JobEntryQuartz(org.quartz.Trigger jobTrigger, org.quartz.JobDetail jobDetail)
jobTrigger
- Job time tablejobDetail
- job detailspublic boolean isNew()
public int getJobId()
public void setJobId(int v)
public org.quartz.Trigger getJobTrigger()
public void setJobTrigger(org.quartz.Trigger jobTrigger)
jobTrigger
- the jobTrigger to setpublic org.quartz.JobDetail getJobDetail()
public int compareTo(JobEntry o)
compareTo
in interface Comparable<JobEntry>
Comparable.compareTo(java.lang.Object)
public void setActive(boolean isActive)
JobEntry
setActive
in interface JobEntry
isActive
- Whether the job is running.JobEntry.setActive(boolean)
public boolean isActive()
JobEntry
isActive
in interface JobEntry
JobEntry.isActive()
public long getNextRuntime()
JobEntry
getNextRuntime
in interface JobEntry
JobEntry.getNextRuntime()
public Date getNextRunDate()
JobEntry
getNextRunDate
in interface JobEntry
JobEntry.getNextRunDate()
public String getNextRunAsString()
JobEntry
getNextRunAsString
in interface JobEntry
JobEntry.getNextRunAsString()
public void calcRunTime() throws TurbineException
JobEntry
calcRunTime
in interface JobEntry
TurbineException
- a generic exception.JobEntry.calcRunTime()
public void execute(org.quartz.JobExecutionContext context) throws org.quartz.JobExecutionException
execute
in interface org.quartz.Job
org.quartz.JobExecutionException
Job.execute(org.quartz.JobExecutionContext)
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.