public class QueueJobCache extends Object
| Constructor and Description |
|---|
QueueJobCache(JobManagerConfiguration configuration,
String queueName,
StatisticsManager statisticsManager,
org.apache.sling.event.jobs.QueueConfiguration.Type queueType,
Set<String> topics)
Create a new queue job cache
|
| Modifier and Type | Method and Description |
|---|---|
JobHandler |
getNextJob(JobConsumerManager jobConsumerManager,
StatisticsManager statisticsManager,
org.apache.sling.event.jobs.Queue queue,
boolean doFull)
Get the next job.
|
Set<String> |
getTopics()
All topics of this queue.
|
void |
handleNewTopics(Set<String> topics)
Inform the queue cache about topics containing new jobs
|
boolean |
isEmpty()
Check whether there are jobs for this queue
|
void |
reschedule(String queueName,
JobHandler handler,
StatisticsManager statisticsManager)
Reschedule a job
Reschedule the job and add it back into the cache.
|
void |
setIsBlocked(boolean value) |
public QueueJobCache(JobManagerConfiguration configuration, String queueName, StatisticsManager statisticsManager, org.apache.sling.event.jobs.QueueConfiguration.Type queueType, Set<String> topics)
configuration - Current job manager configurationqueueName - The queue namestatisticsManager - The statistics managerqueueType - The queue typetopics - The topics handled by this queue.public boolean isEmpty()
true if there is any job outstanding.public void setIsBlocked(boolean value)
public JobHandler getNextJob(JobConsumerManager jobConsumerManager, StatisticsManager statisticsManager, org.apache.sling.event.jobs.Queue queue, boolean doFull)
reschedule(String, JobHandler, StatisticsManager) and handleNewTopics(Set)
can be called concurrently.jobConsumerManager - The job consumer managerstatisticsManager - The statistics managerqueue - The queuedoFull - Whether to do a full scannull.public void handleNewTopics(Set<String> topics)
topics - The set of topics to scanpublic void reschedule(String queueName, JobHandler handler, StatisticsManager statisticsManager)
queueName - The queue namehandler - The job handlerstatisticsManager - The statistics managerCopyright © 2007–2023 The Apache Software Foundation. All rights reserved.