|
||||||||||
| 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(String topic,
Map<String,Object> template)
Find a job - either scheduled or active. |
void |
forceRemoveJob(String jobId)
Cancel this job. |
Queue |
getQueue(String name)
Return a queue with a specific name (if running) |
Iterable<Queue> |
getQueues()
Return an iterator for all available queues. |
Statistics |
getStatistics()
Return statistics information about all queues. |
Iterable<TopicStatistics> |
getTopicStatistics()
Return statistics information about job topics. |
boolean |
isJobProcessingEnabled()
Is job processing enabled? |
JobsIterator |
queryJobs(JobManager.QueryType type,
String topic,
Map<String,Object>... templates)
Return all jobs either running or scheduled. |
boolean |
removeJob(String jobId)
Cancel this job. |
void |
restart()
Restart the job manager. |
| Method Detail |
|---|
Statistics getStatistics()
Iterable<TopicStatistics> getTopicStatistics()
Queue getQueue(String name)
name - The queue name
nullIterable<Queue> getQueues()
JobsIterator queryJobs(JobManager.QueryType type,
String topic,
Map<String,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).
org.osgi.service.event.Event findJob(String topic,
Map<String,Object> template)
topic - Topic is required.template - The map acts like a template. The searched job
must match the template (AND query).
nullboolean removeJob(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(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 | |||||||||