Package org.apache.sling.distribution.journal.impl.publisher

# 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

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static @interface`
`DistributedEventNotifierManager.Configuration`

## Constructor Summary

Constructors
Constructor
Description
`DistributedEventNotifierManager(org.osgi.framework.BundleContext context, DistributedEventNotifierManager.Configuration config, org.osgi.service.event.EventAdmin eventAdmin, PubQueueProvider pubQueueCacheService, org.apache.sling.distribution.journal.MessagingProvider messagingProvider, Topics topics, 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 Type
Method
Description
`void`
`deactivate()`
`void`
`handleTopologyEvent(org.apache.sling.discovery.TopologyEvent event)`
`protected boolean`
`isLeader()`
`void`
`run()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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, Topics topics, 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()