Class QueueManager
java.lang.Object
org.apache.sling.event.impl.jobs.queues.QueueManager
- All Implemented Interfaces:
Runnable
,ConfigurationChangeListener
,org.osgi.service.event.EventHandler
public class QueueManager
extends Object
implements Runnable, org.osgi.service.event.EventHandler, ConfigurationChangeListener
Implementation of the queue manager.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Activate this component.protected void
bindThreadPool
(org.apache.sling.event.impl.EventingThreadPool etp) void
configurationChanged
(boolean active) This method is called whenever the topology or queue configurations change.protected void
Deactivate this component.org.apache.sling.event.jobs.Queue
Iterable<org.apache.sling.event.jobs.Queue>
void
handleEvent
(org.osgi.service.event.Event event) void
run()
This method is invoked periodically by the scheduler.protected void
unbindThreadPool
(org.apache.sling.event.impl.EventingThreadPool etp)
-
Constructor Details
-
QueueManager
public QueueManager()
-
-
Method Details
-
activate
Activate this component.- Parameters:
props
- Configuration properties
-
deactivate
protected void deactivate()Deactivate this component. -
run
public void run()This method is invoked periodically by the scheduler. In the default configuration every minute -
getQueue
- Parameters:
name
- The queue name- Returns:
- The queue or
null
. - See Also:
-
JobManager.getQueue(java.lang.String)
-
getQueues
- Returns:
- An iterator for the available queues.
- See Also:
-
JobManager.getQueues()
-
configurationChanged
public void configurationChanged(boolean active) This method is called whenever the topology or queue configurations change.- Specified by:
configurationChanged
in interfaceConfigurationChangeListener
- Parameters:
active
- Whether the job handling is active atm.
-
handleEvent
public void handleEvent(org.osgi.service.event.Event event) - Specified by:
handleEvent
in interfaceorg.osgi.service.event.EventHandler
- See Also:
-
EventHandler.handleEvent(org.osgi.service.event.Event)
-
bindThreadPool
protected void bindThreadPool(org.apache.sling.event.impl.EventingThreadPool etp) -
unbindThreadPool
protected void unbindThreadPool(org.apache.sling.event.impl.EventingThreadPool etp)
-