|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JobManager
The job manager is the heart of the job event handling. It can be used to manage and monitor the queues.
| Nested Class Summary | |
|---|---|
static class |
JobManager.QueryType
The requested job types for the query. |
| Method Summary | |
|---|---|
org.osgi.service.event.Event |
findJob(java.lang.String topic,
java.util.Map<java.lang.String,java.lang.Object> template)
Find a job - either scheduled or active. |
void |
forceRemoveJob(java.lang.String jobId)
Cancel this job. |
Queue |
getQueue(java.lang.String name)
Return a queue with a specific name (if running) |
java.lang.Iterable<Queue> |
getQueues()
Return an iterator for all available queues. |
Statistics |
getStatistics()
Return statistics information about all queues. |
java.lang.Iterable<TopicStatistics> |
getTopicStatistics()
Return statistics information about job topics. |
boolean |
isJobProcessingEnabled()
Is job processing enabled? |
JobsIterator |
queryJobs(JobManager.QueryType type,
java.lang.String topic,
long limit,
java.util.Map<java.lang.String,java.lang.Object>... templates)
Return all jobs either running or scheduled. |
JobsIterator |
queryJobs(JobManager.QueryType type,
java.lang.String topic,
java.util.Map<java.lang.String,java.lang.Object>... templates)
Return all jobs either running or scheduled. |
boolean |
removeJob(java.lang.String jobId)
Cancel this job. |
void |
restart()
Restart the job manager. |
| Method Detail |
|---|
Statistics getStatistics()
java.lang.Iterable<TopicStatistics> getTopicStatistics()
Queue getQueue(java.lang.String name)
name - The queue name
nulljava.lang.Iterable<Queue> getQueues()
JobsIterator queryJobs(JobManager.QueryType type,
java.lang.String topic,
java.util.Map<java.lang.String,java.lang.Object>... templates)
type - Required parameter for the type: either all jobs, only queued or only started can be returned.topic - Topic can be used as a filter, if it is non-null, only jobs with this topic will be returned.templates - A list of filter property maps. Each map acts like a template. The searched job
must match the template (AND query). By providing several maps, different filters
are possible (OR query).
JobsIterator queryJobs(JobManager.QueryType type,
java.lang.String topic,
long limit,
java.util.Map<java.lang.String,java.lang.Object>... templates)
type - Required parameter for the type: either all jobs, only queued or only started can be returned.topic - Topic can be used as a filter, if it is non-null, only jobs with this topic will be returned.limit - A positive number indicating the maximum number of jobs returned by the iterator.templates - A list of filter property maps. Each map acts like a template. The searched job
must match the template (AND query). By providing several maps, different filters
are possible (OR query).
org.osgi.service.event.Event findJob(java.lang.String topic,
java.util.Map<java.lang.String,java.lang.Object> template)
topic - Topic is required.template - The map acts like a template. The searched job
must match the template (AND query).
nullboolean removeJob(java.lang.String jobId)
jobId - The unique identifer as found in the property JobUtil.JOB_ID.
true if the job could be cancelled or does not exist anymore.
false otherwise.void forceRemoveJob(java.lang.String jobId)
removeJob(String) with the exception that it waits
for a job to finish. The job will be removed when this method returns - however
this method blocks until the job is finished!
jobId - The unique identifer as found in the property JobUtil.JOB_ID.void restart()
boolean isJobProcessingEnabled()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||