public class JobQueueImpl extends Object implements org.apache.sling.event.jobs.Queue
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this queue.
|
static JobQueueImpl |
createQueue(String name,
InternalQueueConfiguration config,
QueueServices services,
Set<String> topics,
Set<String> haltedTopicsBackRef,
org.apache.sling.event.impl.jobs.queues.OutdatedJobQueueInfo outdatedQueueInfo)
Create a new queue.
|
InternalQueueConfiguration |
getConfiguration()
Return the queue configuration
|
String |
getName()
Get the name of the job queue.
|
Object |
getState(String key) |
String |
getStateInfo() |
org.apache.sling.event.jobs.Statistics |
getStatistics() |
boolean |
isSuspended() |
void |
maintain()
Periodic maintenance
|
void |
outdate()
Outdate this queue.
|
void |
removeAll() |
void |
resume() |
void |
startJobs()
Start the job queue.
|
boolean |
stopJob(JobImpl job) |
void |
suspend() |
boolean |
tryToClose()
Check if the queue can be closed
|
void |
wakeUpQueue(Set<String> topics)
Inform the queue about new job for the given topics.
|
public static JobQueueImpl createQueue(String name, InternalQueueConfiguration config, QueueServices services, Set<String> topics, Set<String> haltedTopicsBackRef, org.apache.sling.event.impl.jobs.queues.OutdatedJobQueueInfo outdatedQueueInfo)
name - The queue nameconfig - The queue configurationservices - The queue servicestopics - The topics handled by this queueoutdatedQueueInfo - haltedTopicsBackRef - reference to pass newly halted topics backJobQueueImpl if there are jobs to process, null otherwise.public InternalQueueConfiguration getConfiguration()
getConfiguration in interface org.apache.sling.event.jobs.Queuepublic String getName()
getName in interface org.apache.sling.event.jobs.Queuepublic org.apache.sling.event.jobs.Statistics getStatistics()
getStatistics in interface org.apache.sling.event.jobs.QueueQueue.getStatistics()public void startJobs()
public void outdate()
public boolean tryToClose()
public void close()
public void maintain()
public void wakeUpQueue(Set<String> topics)
topics - the new topicspublic void resume()
resume in interface org.apache.sling.event.jobs.QueueQueue.resume()public void suspend()
suspend in interface org.apache.sling.event.jobs.QueueQueue.suspend()public boolean isSuspended()
isSuspended in interface org.apache.sling.event.jobs.QueueQueue.isSuspended()public void removeAll()
removeAll in interface org.apache.sling.event.jobs.QueueQueue.removeAll()public Object getState(String key)
getState in interface org.apache.sling.event.jobs.QueueQueue.getState(java.lang.String)public String getStateInfo()
getStateInfo in interface org.apache.sling.event.jobs.QueueQueue.getStateInfo()public boolean stopJob(JobImpl job)
Copyright © 2007–2023 The Apache Software Foundation. All rights reserved.