org.apache.sling.event
Interface JobStatusProvider


Deprecated.

@Deprecated
public interface JobStatusProvider

This service provides the current job processing status.


Field Summary
static String PROPERTY_EVENT_ID
          Deprecated. Use JobUtil.JOB_ID
 
Method Summary
 void cancelJob(String jobId)
          Deprecated. Use removeJob(String) instead.
 void cancelJob(String topic, String jobId)
          Deprecated. Use removeJob(String, String) instead.
 void forceRemoveJob(String jobId)
          Deprecated. Cancel this job.
 void forceRemoveJob(String topic, String jobId)
          Deprecated. Cancel this job.
 Collection<org.osgi.service.event.Event> getAllJobs(String topic, Map<String,Object>... filterProps)
          Deprecated. Use queryAllJobs(String, Map...) instead.
 Collection<org.osgi.service.event.Event> getCurrentJobs(String topic)
          Deprecated. Use queryCurrentJobs(String, Map...) instead.
 Collection<org.osgi.service.event.Event> getCurrentJobs(String topic, Map<String,Object>... filterProps)
          Deprecated. Use queryCurrentJobs(String, Map...) instead.
 Collection<org.osgi.service.event.Event> getScheduledJobs(String topic)
          Deprecated. Use queryScheduledJobs(String, Map...) instead.
 Collection<org.osgi.service.event.Event> getScheduledJobs(String topic, Map<String,Object>... filterProps)
          Deprecated. Use queryScheduledJobs(String, Map...) instead.
 JobsIterator queryAllJobs(String topic, Map<String,Object>... filterProps)
          Deprecated. Return all jobs either running or scheduled.
 JobsIterator queryCurrentJobs(String topic, Map<String,Object>... filterProps)
          Deprecated. Return the jobs which are currently in processing.
 JobsIterator queryScheduledJobs(String topic, Map<String,Object>... filterProps)
          Deprecated. Return a list of currently scheduled jobs.
 boolean removeJob(String jobId)
          Deprecated. Cancel this job.
 boolean removeJob(String topic, String jobId)
          Deprecated. Cancel this job.
 void wakeUpJobQueue(String jobQueueName)
          Deprecated. Wake up the named job queue.
 

Field Detail

PROPERTY_EVENT_ID

@Deprecated
static final String PROPERTY_EVENT_ID
Deprecated. Use JobUtil.JOB_ID
This is a unique identifer which can be used to cancel the job.

See Also:
Constant Field Values
Method Detail

removeJob

boolean removeJob(String jobId)
Deprecated. 
Cancel this job. Cancelling a job might fail if the job is currently in processing.

Parameters:
jobId - The unique identifer as found in the property PROPERTY_EVENT_ID.
Returns:
true if the job could be cancelled or does not exist anymore. false otherwise.
Since:
2.4.0

removeJob

boolean removeJob(String topic,
                  String jobId)
Deprecated. 
Cancel this job. Cancelling a job might fail if the job is currently in processing. This method can be used if the topic and the provided job id is known.

Parameters:
topic - The job topic as put into the property JobUtil.PROPERTY_JOB_TOPIC.
jobId - The unique identifer as put into the property JobUtil.PROPERTY_JOB_NAME.
Returns:
true if the job could be cancelled or does not exist anymore. false otherwise.
Since:
2.4.0

forceRemoveJob

void forceRemoveJob(String jobId)
Deprecated. 
Cancel this job. This method acts like 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!

Parameters:
jobId - The unique identifer as found in the property PROPERTY_EVENT_ID.
Since:
2.4.0

forceRemoveJob

void forceRemoveJob(String topic,
                    String jobId)
Deprecated. 
Cancel this job. This method acts like removeJob(String, 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! This method can be used if the topic and the provided job id is known.

Parameters:
topic - The job topic as put into the property JobUtil.PROPERTY_JOB_TOPIC.
jobId - The unique identifer as put into the property JobUtil.PROPERTY_JOB_NAME.
Since:
2.4.0

wakeUpJobQueue

void wakeUpJobQueue(String jobQueueName)
Deprecated. 
Wake up the named job queue. If a job failed, the job queue waits (sleeps) for a configured time. By calling this method, the job queue can be woken up and force an immediate reprocessing.

Parameters:
jobQueueName - The name of the queue.

queryScheduledJobs

JobsIterator queryScheduledJobs(String topic,
                                Map<String,Object>... filterProps)
Deprecated. 
Return a list of currently scheduled jobs.

Parameters:
topic - Topic can be used as a filter, if it is non-null, only jobs with this topic will be returned.
filterProps - 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).
Returns:
A non null collection.
Since:
2.4

queryCurrentJobs

JobsIterator queryCurrentJobs(String topic,
                              Map<String,Object>... filterProps)
Deprecated. 
Return the jobs which are currently in processing. If there are several application nodes in the cluster, there could be more than one job in processing

Parameters:
topic - Topic can be used as a filter, if it is non-null, only jobs with this topic will be returned.
filterProps - 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).
Returns:
A non null collection.
Since:
2.4

queryAllJobs

JobsIterator queryAllJobs(String topic,
                          Map<String,Object>... filterProps)
Deprecated. 
Return all jobs either running or scheduled. This is actually a convenience method and collects the results from queryScheduledJobs(String, Map...) and queryCurrentJobs(String, Map...)

Parameters:
topic - Topic can be used as a filter, if it is non-null, only jobs with this topic will be returned.
filterProps - 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).
Returns:
A non null collection.
Since:
2.4

getScheduledJobs

@Deprecated
Collection<org.osgi.service.event.Event> getScheduledJobs(String topic)
Deprecated. Use queryScheduledJobs(String, Map...) instead.

Return a list of currently scheduled jobs.

Parameters:
topic - Topic can be used as a filter, if it is non-null, only jobs with this topic will be returned.
Returns:
A non null collection.

getCurrentJobs

@Deprecated
Collection<org.osgi.service.event.Event> getCurrentJobs(String topic)
Deprecated. Use queryCurrentJobs(String, Map...) instead.

Return the jobs which are currently in processing. If there are several application nodes in the cluster, there could be more than one job in processing

Parameters:
topic - Topic can be used as a filter, if it is non-null, only jobs with this topic will be returned.
Returns:
A non null collection.

getScheduledJobs

@Deprecated
Collection<org.osgi.service.event.Event> getScheduledJobs(String topic,
                                                                     Map<String,Object>... filterProps)
Deprecated. Use queryScheduledJobs(String, Map...) instead.

Return a list of currently scheduled jobs.

Parameters:
topic - Topic can be used as a filter, if it is non-null, only jobs with this topic will be returned.
filterProps - 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).
Returns:
A non null collection.

getCurrentJobs

@Deprecated
Collection<org.osgi.service.event.Event> getCurrentJobs(String topic,
                                                                   Map<String,Object>... filterProps)
Deprecated. Use queryCurrentJobs(String, Map...) instead.

Return the jobs which are currently in processing. If there are several application nodes in the cluster, there could be more than one job in processing

Parameters:
topic - Topic can be used as a filter, if it is non-null, only jobs with this topic will be returned.
filterProps - 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).
Returns:
A non null collection.

getAllJobs

@Deprecated
Collection<org.osgi.service.event.Event> getAllJobs(String topic,
                                                               Map<String,Object>... filterProps)
Deprecated. Use queryAllJobs(String, Map...) instead.

Return all jobs either running or scheduled. This is actually a convenience method and collects the results from getScheduledJobs(String, Map...) and getCurrentJobs(String, Map...)

Parameters:
topic - Topic can be used as a filter, if it is non-null, only jobs with this topic will be returned.
filterProps - 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).
Returns:
A non null collection.

cancelJob

@Deprecated
void cancelJob(String jobId)
Deprecated. Use removeJob(String) instead.

Cancel this job. Cancelling a job might fail if the job is currently in processing.

Parameters:
jobId - The unique identifer as found in the property PROPERTY_EVENT_ID.

cancelJob

@Deprecated
void cancelJob(String topic,
                          String jobId)
Deprecated. Use removeJob(String, String) instead.

Cancel this job. Cancelling a job might fail if the job is currently in processing. This method can be used if the topic and the provided job id is known.

Parameters:
topic - The job topic as put into the property EventUtil.PROPERTY_JOB_TOPIC.
jobId - The unique identifer as put into the property EventUtil.PROPERTY_JOB_ID.


Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.