Class DistributedEventNotifierManager

java.lang.Object
org.apache.sling.distribution.journal.impl.publisher.DistributedEventNotifierManager
All Implemented Interfaces:
Runnable, org.apache.sling.discovery.TopologyEventListener

public class DistributedEventNotifierManager extends Object implements org.apache.sling.discovery.TopologyEventListener, Runnable
  • 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 interface org.apache.sling.discovery.TopologyEventListener
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • isLeader

      protected boolean isLeader()