|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ofbiz.service.job.JobPoller
public class JobPoller
JobPoller - Polls for persisted jobs to run.
Field Summary | |
---|---|
protected boolean |
isRunning
|
protected JobManager |
jm
|
static int |
MAX_JOBS
|
static int |
MAX_THREADS
|
static int |
MIN_THREADS
|
static java.lang.String |
module
|
static int |
POLL_WAIT
|
protected java.util.List<JobInvoker> |
pool
|
protected java.util.List<Job> |
run
|
protected java.lang.Thread |
thread
|
Constructor Summary | |
---|---|
protected |
JobPoller()
|
|
JobPoller(JobManager jm,
boolean enabled)
Creates a new JobScheduler |
Method Summary | |
---|---|
JobManager |
getManager()
Returns the JobManager |
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
getPoolState()
|
void |
killThread(java.lang.String threadName)
|
Job |
next()
Returns the next job to run |
void |
queueNow(Job job)
Adds a job to the RUN queue |
void |
removeThread(JobInvoker invoker)
Removes a thread from the pool. |
void |
run()
|
void |
stop()
Stops the JobPoller |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String module
public static final int MIN_THREADS
public static final int MAX_THREADS
public static final int MAX_JOBS
public static final int POLL_WAIT
protected java.lang.Thread thread
protected java.util.List<JobInvoker> pool
protected java.util.List<Job> run
protected JobManager jm
protected volatile boolean isRunning
Constructor Detail |
---|
public JobPoller(JobManager jm, boolean enabled)
jm
- JobManager associated with this schedulerprotected JobPoller()
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
public JobManager getManager()
public void stop()
public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getPoolState()
public void killThread(java.lang.String threadName)
public Job next()
public void queueNow(Job job)
public void removeThread(JobInvoker invoker)
invoker
- The invoker to remove.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |