servicenow.community.sql
Class JobCollection
java.lang.Object
servicenow.community.sql.JobCollection
public class JobCollection
- extends java.lang.Object
Contains a collection of jobs as loaded from a script file
or from a u_datapump_jobset in the ServiceNow instance.
- Author:
- LewisGF
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
jobs
protected java.util.LinkedList<JobController> jobs
runstart
protected GlideDateTime runstart
JobCollection
public JobCollection(Pumper pumper)
addJob
public void addJob(GlideRecord rec)
throws PumperException,
java.io.IOException,
java.sql.SQLException,
org.jdom2.JDOMException,
java.text.ParseException
- Throws:
PumperException
java.io.IOException
java.sql.SQLException
org.jdom2.JDOMException
java.text.ParseException
addJob
public void addJob(java.lang.String command)
throws PumperException,
java.io.IOException,
java.sql.SQLException,
org.jdom2.JDOMException
- Throws:
PumperException
java.io.IOException
java.sql.SQLException
org.jdom2.JDOMException
loadJobSet
public void loadJobSet(java.lang.String jobsetname)
throws java.lang.Exception
- Throws:
java.lang.Exception
loadScriptFile
public void loadScriptFile(java.lang.String filename)
throws PumperException,
java.io.IOException,
org.jdom2.JDOMException,
java.sql.SQLException
- Throws:
PumperException
java.io.IOException
org.jdom2.JDOMException
java.sql.SQLException
persistent
public boolean persistent()
polling
public boolean polling()
numJobs
public int numJobs()
defaultFrequency
public int defaultFrequency()
getRunStart
public GlideDateTime getRunStart()
verifyTimeZone
public void verifyTimeZone()
throws java.io.IOException,
java.text.ParseException,
PumperException
- Throws:
java.io.IOException
java.text.ParseException
PumperException
startRunning
public GlideDateTime startRunning()
throws java.io.IOException,
java.text.ParseException
- Throws:
java.io.IOException
java.text.ParseException
setStatus
public void setStatus(JobStatus status)
throws java.io.IOException
- Throws:
java.io.IOException
numReady
public int numReady()
resetAll
public void resetAll()
throws java.io.IOException
- Throws:
java.io.IOException
resumeAll
public void resumeAll()
throws java.io.IOException
- Throws:
java.io.IOException
cancel
public void cancel()
throws java.io.IOException
- Throws:
java.io.IOException
run
public void run()
runAll
public void runAll()
throws java.lang.Exception
- Throws:
java.lang.Exception
runJobs
public void runJobs()
throws java.lang.Exception
- Run each job once, if it is ready.
- Throws:
java.lang.Exception