Class DistributedEventNotifierManager
java.lang.Object
org.apache.sling.distribution.journal.impl.publisher.DistributedEventNotifierManager
- All Implemented Interfaces:
Runnable
,org.apache.sling.discovery.TopologyEventListener
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDistributedEventNotifierManager
(org.osgi.framework.BundleContext context, DistributedEventNotifierManager.Configuration config, org.osgi.service.event.EventAdmin eventAdmin, PubQueueProvider pubQueueCacheService, org.apache.sling.distribution.journal.MessagingProvider messagingProvider, org.apache.sling.api.resource.ResourceResolverFactory resolverFactory, org.osgi.service.event.EventHandler distributedEventHandler) Register the package distributed event notifier service on all or only the leader instance in a cluster according to the configuration. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
handleTopologyEvent
(org.apache.sling.discovery.TopologyEvent event) protected boolean
isLeader()
void
run()
-
Constructor Details
-
DistributedEventNotifierManager
public DistributedEventNotifierManager(org.osgi.framework.BundleContext context, DistributedEventNotifierManager.Configuration config, org.osgi.service.event.EventAdmin eventAdmin, PubQueueProvider pubQueueCacheService, org.apache.sling.distribution.journal.MessagingProvider messagingProvider, org.apache.sling.api.resource.ResourceResolverFactory resolverFactory, org.osgi.service.event.EventHandler distributedEventHandler) Register the package distributed event notifier service on all or only the leader instance in a cluster according to the configuration. The reference to distributedEventHandler should be pointed to a specific event handler via config. This will guarantee that the event handler will not miss any events.
-
-
Method Details
-
deactivate
public void deactivate() -
handleTopologyEvent
public void handleTopologyEvent(org.apache.sling.discovery.TopologyEvent event) - Specified by:
handleTopologyEvent
in interfaceorg.apache.sling.discovery.TopologyEventListener
-
run
public void run() -
isLeader
protected boolean isLeader()
-