org.apache.sling.event.impl.jobs.jcr
Class JobStatusProviderImpl

java.lang.Object
  extended by org.apache.sling.event.impl.jobs.jcr.JobStatusProviderImpl
All Implemented Interfaces:
JobStatusProvider

Deprecated.

@Deprecated
@Service(value=JobStatusProvider.class)
public class JobStatusProviderImpl
extends Object
implements JobStatusProvider

An service to query jobs.


Field Summary
 
Fields inherited from interface org.apache.sling.event.JobStatusProvider
PROPERTY_EVENT_ID
 
Constructor Summary
JobStatusProviderImpl()
          Deprecated.  
 
Method Summary
 void cancelJob(String jobId)
          Deprecated. 
 void cancelJob(String topic, String jobId)
          Deprecated. 
 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. 
 Collection<org.osgi.service.event.Event> getCurrentJobs(String topic)
          Deprecated. 
 Collection<org.osgi.service.event.Event> getCurrentJobs(String topic, Map<String,Object>... filterProps)
          Deprecated. 
 Collection<org.osgi.service.event.Event> getScheduledJobs(String topic)
          Deprecated. 
 Collection<org.osgi.service.event.Event> getScheduledJobs(String topic, Map<String,Object>... filterProps)
          Deprecated. 
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobStatusProviderImpl

public JobStatusProviderImpl()
Deprecated. 
Method Detail

removeJob

public boolean removeJob(String topic,
                         String jobId)
Deprecated. 
Description copied from interface: JobStatusProvider
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.

Specified by:
removeJob in interface JobStatusProvider
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.
See Also:
JobStatusProvider.removeJob(java.lang.String, java.lang.String)

removeJob

public boolean removeJob(String jobId)
Deprecated. 
Description copied from interface: JobStatusProvider
Cancel this job. Cancelling a job might fail if the job is currently in processing.

Specified by:
removeJob in interface JobStatusProvider
Parameters:
jobId - The unique identifer as found in the property JobStatusProvider.PROPERTY_EVENT_ID.
Returns:
true if the job could be cancelled or does not exist anymore. false otherwise.
See Also:
JobStatusProvider.removeJob(java.lang.String)

forceRemoveJob

public void forceRemoveJob(String topic,
                           String jobId)
Deprecated. 
Description copied from interface: JobStatusProvider
Cancel this job. This method acts like JobStatusProvider.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.

Specified by:
forceRemoveJob in interface JobStatusProvider
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.
See Also:
JobStatusProvider.forceRemoveJob(java.lang.String, java.lang.String)

forceRemoveJob

public void forceRemoveJob(String jobId)
Deprecated. 
Description copied from interface: JobStatusProvider
Cancel this job. This method acts like JobStatusProvider.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!

Specified by:
forceRemoveJob in interface JobStatusProvider
Parameters:
jobId - The unique identifer as found in the property JobStatusProvider.PROPERTY_EVENT_ID.
See Also:
JobStatusProvider.forceRemoveJob(java.lang.String)

wakeUpJobQueue

public void wakeUpJobQueue(String jobQueueName)
Deprecated. 
Description copied from interface: JobStatusProvider
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.

Specified by:
wakeUpJobQueue in interface JobStatusProvider
Parameters:
jobQueueName - The name of the queue.
See Also:
JobStatusProvider.wakeUpJobQueue(java.lang.String)

queryAllJobs

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

Specified by:
queryAllJobs in interface JobStatusProvider
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.
See Also:
JobStatusProvider.queryAllJobs(String, Map...)

queryCurrentJobs

public JobsIterator queryCurrentJobs(String topic,
                                     Map<String,Object>... filterProps)
Deprecated. 
Description copied from interface: JobStatusProvider
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

Specified by:
queryCurrentJobs in interface JobStatusProvider
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.
See Also:
JobStatusProvider.queryCurrentJobs(String, Map...)

queryScheduledJobs

public JobsIterator queryScheduledJobs(String topic,
                                       Map<String,Object>... filterProps)
Deprecated. 
Description copied from interface: JobStatusProvider
Return a list of currently scheduled jobs.

Specified by:
queryScheduledJobs in interface JobStatusProvider
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.
See Also:
JobStatusProvider.queryScheduledJobs(String, Map...)

getCurrentJobs

@Deprecated
public Collection<org.osgi.service.event.Event> getCurrentJobs(String topic)
Deprecated. 

Description copied from interface: JobStatusProvider
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

Specified by:
getCurrentJobs in interface JobStatusProvider
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.
See Also:
JobStatusProvider.getCurrentJobs(java.lang.String)

getScheduledJobs

@Deprecated
public Collection<org.osgi.service.event.Event> getScheduledJobs(String topic)
Deprecated. 

Description copied from interface: JobStatusProvider
Return a list of currently scheduled jobs.

Specified by:
getScheduledJobs in interface JobStatusProvider
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.
See Also:
JobStatusProvider.getScheduledJobs(java.lang.String)

getCurrentJobs

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

Description copied from interface: JobStatusProvider
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

Specified by:
getCurrentJobs in interface JobStatusProvider
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.
See Also:
JobStatusProvider.getCurrentJobs(java.lang.String, java.util.Map...)

getScheduledJobs

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

Description copied from interface: JobStatusProvider
Return a list of currently scheduled jobs.

Specified by:
getScheduledJobs in interface JobStatusProvider
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.
See Also:
JobStatusProvider.getScheduledJobs(java.lang.String, java.util.Map...)

getAllJobs

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

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

Specified by:
getAllJobs in interface JobStatusProvider
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.
See Also:
JobStatusProvider.getAllJobs(java.lang.String, java.util.Map...)

cancelJob

@Deprecated
public void cancelJob(String topic,
                                 String jobId)
Deprecated. 

Description copied from interface: JobStatusProvider
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.

Specified by:
cancelJob in interface JobStatusProvider
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.
See Also:
JobStatusProvider.cancelJob(java.lang.String, java.lang.String)

cancelJob

@Deprecated
public void cancelJob(String jobId)
Deprecated. 

Description copied from interface: JobStatusProvider
Cancel this job. Cancelling a job might fail if the job is currently in processing.

Specified by:
cancelJob in interface JobStatusProvider
Parameters:
jobId - The unique identifer as found in the property JobStatusProvider.PROPERTY_EVENT_ID.
See Also:
JobStatusProvider.cancelJob(java.lang.String)


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