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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidActivate this component.protected voidbindThreadPool(org.apache.sling.event.impl.EventingThreadPool etp) voidconfigurationChanged(boolean active) This method is called whenever the topology or queue configurations change.protected voidDeactivate this component.org.apache.sling.event.jobs.QueueIterable<org.apache.sling.event.jobs.Queue>voidhandleEvent(org.osgi.service.event.Event event) voidrun()This method is invoked periodically by the scheduler.protected voidunbindThreadPool(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:
configurationChangedin interfaceConfigurationChangeListener- Parameters:
active- Whether the job handling is active atm.
-
handleEvent
public void handleEvent(org.osgi.service.event.Event event) - Specified by:
handleEventin 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)
-