|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ofbiz.service.job.JobManager
public class JobManager
JobManager
Field Summary | |
---|---|
protected GenericDelegator |
delegator
|
static java.lang.String |
dispatcherName
|
static java.lang.String |
instanceId
|
protected JobPoller |
jp
|
static java.lang.String |
module
|
static java.util.Map<java.lang.String,JobManager> |
registeredManagers
|
static java.util.Map<java.lang.String,java.lang.Object> |
updateFields
|
Constructor Summary | |
---|---|
JobManager(GenericDelegator delegator)
Creates a new JobManager object. |
|
JobManager(GenericDelegator delegator,
boolean enabled)
|
Method Summary | |
---|---|
void |
finalize()
|
GenericDelegator |
getDelegator()
Returns the GenericDelegator. |
LocalDispatcher |
getDispatcher()
Returns the ServiceDispatcher. |
static JobManager |
getInstance(GenericDelegator delegator,
boolean enabled)
|
static RecurrenceInfo |
getRecurrenceInfo(GenericValue job)
gets the recurrence info object for a job. |
void |
killThread(java.lang.String threadName)
Kill a JobInvoker Thread. |
java.util.List<Job> |
poll()
|
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
processList()
Get a List of each threads current state. |
void |
reloadCrashedJobs()
|
void |
runJob(Job job)
Queues a Job to run now. |
void |
schedule(java.lang.String serviceName,
java.util.Map<java.lang.String,? extends java.lang.Object> context,
long startTime,
int frequency,
int interval,
int count)
Schedule a job to start at a specific time with specific recurrence info |
void |
schedule(java.lang.String serviceName,
java.util.Map<java.lang.String,? extends java.lang.Object> context,
long startTime,
int frequency,
int interval,
int count,
long endTime)
Schedule a job to start at a specific time with specific recurrence info |
void |
schedule(java.lang.String serviceName,
java.util.Map<java.lang.String,? extends java.lang.Object> context,
long startTime,
int frequency,
int interval,
long endTime)
Schedule a job to start at a specific time with specific recurrence info |
void |
schedule(java.lang.String poolName,
java.lang.String serviceName,
java.util.Map<java.lang.String,? extends java.lang.Object> context,
long startTime,
int frequency,
int interval,
int count,
long endTime)
Schedule a job to start at a specific time with specific recurrence info |
void |
schedule(java.lang.String poolName,
java.lang.String serviceName,
java.lang.String dataId,
long startTime)
Schedule a job to start at a specific time with specific recurrence info |
void |
schedule(java.lang.String jobName,
java.lang.String poolName,
java.lang.String serviceName,
java.util.Map<java.lang.String,? extends java.lang.Object> context,
long startTime,
int frequency,
int interval,
int count,
long endTime,
int maxRetry)
Schedule a job to start at a specific time with specific recurrence info |
void |
schedule(java.lang.String jobName,
java.lang.String poolName,
java.lang.String serviceName,
java.lang.String dataId,
long startTime,
int frequency,
int interval,
int count,
long endTime,
int maxRetry)
Schedule a job to start at a specific time with specific recurrence info |
void |
shutdown()
Close out the scheduler thread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String instanceId
public static final java.util.Map<java.lang.String,java.lang.Object> updateFields
public static final java.lang.String module
public static final java.lang.String dispatcherName
public static java.util.Map<java.lang.String,JobManager> registeredManagers
protected GenericDelegator delegator
protected JobPoller jp
Constructor Detail |
---|
public JobManager(GenericDelegator delegator)
public JobManager(GenericDelegator delegator, boolean enabled)
Method Detail |
---|
public static JobManager getInstance(GenericDelegator delegator, boolean enabled)
public void runJob(Job job) throws JobManagerException
JobManagerException
public LocalDispatcher getDispatcher()
public GenericDelegator getDelegator()
public java.util.List<Job> poll()
public void reloadCrashedJobs()
public void schedule(java.lang.String serviceName, java.util.Map<java.lang.String,? extends java.lang.Object> context, long startTime, int frequency, int interval, int count) throws JobManagerException
serviceName
- The name of the service to invokecontext
- The context for the servicestartTime
- The time in milliseconds the service should runfrequency
- The frequency of the recurrence (HOURLY,DAILY,MONTHLY,etc)interval
- The interval of the frequency recurrencecount
- The number of times to repeat
JobManagerException
public void schedule(java.lang.String serviceName, java.util.Map<java.lang.String,? extends java.lang.Object> context, long startTime, int frequency, int interval, long endTime) throws JobManagerException
serviceName
- The name of the service to invokecontext
- The context for the servicestartTime
- The time in milliseconds the service should runfrequency
- The frequency of the recurrence (HOURLY,DAILY,MONTHLY,etc)interval
- The interval of the frequency recurrenceendTime
- The time in milliseconds the service should expire
JobManagerException
public void schedule(java.lang.String serviceName, java.util.Map<java.lang.String,? extends java.lang.Object> context, long startTime, int frequency, int interval, int count, long endTime) throws JobManagerException
serviceName
- The name of the service to invokecontext
- The context for the servicestartTime
- The time in milliseconds the service should runfrequency
- The frequency of the recurrence (HOURLY,DAILY,MONTHLY,etc)interval
- The interval of the frequency recurrencecount
- The number of times to repeatendTime
- The time in milliseconds the service should expire
JobManagerException
public void schedule(java.lang.String poolName, java.lang.String serviceName, java.util.Map<java.lang.String,? extends java.lang.Object> context, long startTime, int frequency, int interval, int count, long endTime) throws JobManagerException
poolName
- The name of the pool to run the service fromserviceName
- The name of the service to invokecontext
- The context for the servicestartTime
- The time in milliseconds the service should runfrequency
- The frequency of the recurrence (HOURLY,DAILY,MONTHLY,etc)interval
- The interval of the frequency recurrencecount
- The number of times to repeatendTime
- The time in milliseconds the service should expire
JobManagerException
public void schedule(java.lang.String jobName, java.lang.String poolName, java.lang.String serviceName, java.util.Map<java.lang.String,? extends java.lang.Object> context, long startTime, int frequency, int interval, int count, long endTime, int maxRetry) throws JobManagerException
jobName
- The name of the jobpoolName
- The name of the pool to run the service fromserviceName
- The name of the service to invokecontext
- The context for the servicestartTime
- The time in milliseconds the service should runfrequency
- The frequency of the recurrence (HOURLY,DAILY,MONTHLY,etc)interval
- The interval of the frequency recurrencecount
- The number of times to repeatendTime
- The time in milliseconds the service should expiremaxRetry
- The max number of retries on failure (-1 for no max)
JobManagerException
public void schedule(java.lang.String poolName, java.lang.String serviceName, java.lang.String dataId, long startTime) throws JobManagerException
poolName
- The name of the pool to run the service fromserviceName
- The name of the service to invokedataId
- The persisted context (RuntimeData.runtimeDataId)startTime
- The time in milliseconds the service should run
JobManagerException
public void schedule(java.lang.String jobName, java.lang.String poolName, java.lang.String serviceName, java.lang.String dataId, long startTime, int frequency, int interval, int count, long endTime, int maxRetry) throws JobManagerException
jobName
- The name of the jobpoolName
- The name of the pool to run the service fromserviceName
- The name of the service to invokedataId
- The persisted context (RuntimeData.runtimeDataId)startTime
- The time in milliseconds the service should runfrequency
- The frequency of the recurrence (HOURLY,DAILY,MONTHLY,etc)interval
- The interval of the frequency recurrencecount
- The number of times to repeatendTime
- The time in milliseconds the service should expiremaxRetry
- The max number of retries on failure (-1 for no max)
JobManagerException
public void killThread(java.lang.String threadName)
threadName
- Name of the JobInvoker Thread to kill.public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> processList()
public void shutdown()
public void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public static RecurrenceInfo getRecurrenceInfo(GenericValue job)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |