Package org.apache.sling.discovery.oak

## Class OakDiscoveryService

- java.lang.Object
- - org.apache.sling.discovery.base.commons.BaseDiscoveryService
  - - org.apache.sling.discovery.oak.OakDiscoveryService

All Implemented Interfaces:
  `org.apache.sling.discovery.DiscoveryService`

    public class OakDiscoveryService
    extends org.apache.sling.discovery.base.commons.BaseDiscoveryService

This implementation of the cross-cluster service uses the view manager implementation for detecting changes in a cluster and only supports one cluster (of which this instance is part of).

### Constructor Summary

Constructors
`OakDiscoveryService()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`protected void` `activate​(org.osgi.framework.BundleContext bundleContext)` Activate this service
`protected void` `bindPropertyProvider​(org.apache.sling.discovery.PropertyProvider propertyProvider, Map<String,​Object> props)` Bind a new property provider.
`protected void` `bindTopologyEventListener​(org.apache.sling.discovery.TopologyEventListener eventListener)` bind a topology event listener
`void` `checkForTopologyChange()` Check the current topology for any potential change
`protected void` `deactivate()` Deactivate this service
`protected org.apache.sling.discovery.base.connectors.announcement.AnnouncementRegistry` `getAnnouncementRegistry()`
`protected org.apache.sling.discovery.base.commons.ClusterViewService` `getClusterViewService()`
`org.apache.sling.discovery.commons.providers.ViewStateManager` `getViewStateManager()` for testing only
`protected void` `handleIsolatedFromTopology()`
`void` `handleTopologyChanging()` Handle the fact that the topology has started to change - inform the listeners asap

`static OakDiscoveryService`

`testConstructor​(org.apache.sling.settings.SlingSettingsService settingsService, org.apache.sling.discovery.base.connectors.announcement.AnnouncementRegistry announcementRegistry, org.apache.sling.discovery.base.connectors.ping.ConnectorRegistry connectorRegistry, org.apache.sling.discovery.base.commons.ClusterViewService clusterViewService, Config config, OakViewChecker connectorPinger, org.apache.sling.commons.scheduler.Scheduler scheduler, org.apache.sling.discovery.commons.providers.spi.base.IdMapService idMapService, org.apache.sling.discovery.commons.providers.spi.base.OakBacklogClusterSyncService oakBacklogClusterSyncService, org.apache.sling.discovery.commons.providers.spi.base.SyncTokenService syncTokenService, org.apache.sling.api.resource.ResourceResolverFactory factory)`

`protected void` `unbindPropertyProvider​(org.apache.sling.discovery.PropertyProvider propertyProvider, Map<String,​Object> props)` Unbind a property provider
`protected void` `unbindTopologyEventListener​(org.apache.sling.discovery.TopologyEventListener eventListener)` Unbind a topology event listener
`protected void` `updatedPropertyProvider​(org.apache.sling.discovery.PropertyProvider propertyProvider, Map<String,​Object> props)` Update a property provider.
`void` `updateProperties()` Update the properties and sent a topology event if applicable

### Methods inherited from class org.apache.sling.discovery.base.commons.BaseDiscoveryService

`getOldView, getTopology, setOldView`

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

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

### Constructor Detail

#### OakDiscoveryService

    public OakDiscoveryService()

### Method Detail

#### testConstructor

    public static OakDiscoveryService testConstructor​(org.apache.sling.settings.SlingSettingsService settingsService,
                                                      org.apache.sling.discovery.base.connectors.announcement.AnnouncementRegistry announcementRegistry,
                                                      org.apache.sling.discovery.base.connectors.ping.ConnectorRegistry connectorRegistry,
                                                      org.apache.sling.discovery.base.commons.ClusterViewService clusterViewService,
                                                      Config config,
                                                      OakViewChecker connectorPinger,
                                                      org.apache.sling.commons.scheduler.Scheduler scheduler,
                                                      org.apache.sling.discovery.commons.providers.spi.base.IdMapService idMapService,
                                                      org.apache.sling.discovery.commons.providers.spi.base.OakBacklogClusterSyncService oakBacklogClusterSyncService,
                                                      org.apache.sling.discovery.commons.providers.spi.base.SyncTokenService syncTokenService,
                                                      org.apache.sling.api.resource.ResourceResolverFactory factory)

#### handleIsolatedFromTopology

    protected void handleIsolatedFromTopology()

Specified by:
  `handleIsolatedFromTopology` in class `org.apache.sling.discovery.base.commons.BaseDiscoveryService`

#### activate

    protected void activate​(org.osgi.framework.BundleContext bundleContext)

Activate this service

#### deactivate

    protected void deactivate()

Deactivate this service

#### bindTopologyEventListener

    protected void bindTopologyEventListener​(org.apache.sling.discovery.TopologyEventListener eventListener)

bind a topology event listener

#### unbindTopologyEventListener

    protected void unbindTopologyEventListener​(org.apache.sling.discovery.TopologyEventListener eventListener)

Unbind a topology event listener

#### bindPropertyProvider

    protected void bindPropertyProvider​(org.apache.sling.discovery.PropertyProvider propertyProvider,
                                        Map<String,​Object> props)

Bind a new property provider.

#### updatedPropertyProvider

    protected void updatedPropertyProvider​(org.apache.sling.discovery.PropertyProvider propertyProvider,
                                           Map<String,​Object> props)

Update a property provider.

#### unbindPropertyProvider

    protected void unbindPropertyProvider​(org.apache.sling.discovery.PropertyProvider propertyProvider,
                                          Map<String,​Object> props)

Unbind a property provider

#### updateProperties

    public void updateProperties()

Update the properties and sent a topology event if applicable

#### checkForTopologyChange

    public void checkForTopologyChange()

Check the current topology for any potential change

#### handleTopologyChanging

    public void handleTopologyChanging()

Handle the fact that the topology has started to change - inform the listeners asap

#### getClusterViewService

    protected org.apache.sling.discovery.base.commons.ClusterViewService getClusterViewService()

Specified by:
  `getClusterViewService` in class `org.apache.sling.discovery.base.commons.BaseDiscoveryService`

#### getAnnouncementRegistry

    protected org.apache.sling.discovery.base.connectors.announcement.AnnouncementRegistry getAnnouncementRegistry()

Specified by:
  `getAnnouncementRegistry` in class `org.apache.sling.discovery.base.commons.BaseDiscoveryService`

#### getViewStateManager

    public org.apache.sling.discovery.commons.providers.ViewStateManager getViewStateManager()

for testing only

Returns: