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:
DiscoveryService
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected void
activate
(org.osgi.framework.BundleContext bundleContext) Activate this serviceprotected void
bindPropertyProvider
(PropertyProvider propertyProvider, Map<String, Object> props) Bind a new property provider.protected void
bindTopologyEventListener
(TopologyEventListener eventListener) bind a topology event listenervoid
Check the current topology for any potential changeprotected void
Deactivate this serviceprotected AnnouncementRegistry
protected ClusterViewService
for testing onlyprotected void
void
Handle the fact that the topology has started to change - inform the listeners asapstatic OakDiscoveryService
testConstructor
(SlingSettingsService settingsService, AnnouncementRegistry announcementRegistry, ConnectorRegistry connectorRegistry, ClusterViewService clusterViewService, Config config, OakViewChecker connectorPinger, Scheduler scheduler, IdMapService idMapService, OakBacklogClusterSyncService oakBacklogClusterSyncService, SyncTokenService syncTokenService, ResourceResolverFactory factory) protected void
unbindPropertyProvider
(PropertyProvider propertyProvider, Map<String, Object> props) Unbind a property providerprotected void
unbindTopologyEventListener
(TopologyEventListener eventListener) Unbind a topology event listenerprotected void
updatedPropertyProvider
(PropertyProvider propertyProvider, Map<String, Object> props) Update a property provider.void
Update the properties and sent a topology event if applicableMethods inherited from class org.apache.sling.discovery.base.commons.BaseDiscoveryService
getOldView, getTopology, setOldView
-
Constructor Details
-
OakDiscoveryService
public OakDiscoveryService()
-
-
Method Details
-
testConstructor
public static OakDiscoveryService testConstructor(SlingSettingsService settingsService, AnnouncementRegistry announcementRegistry, ConnectorRegistry connectorRegistry, ClusterViewService clusterViewService, Config config, OakViewChecker connectorPinger, Scheduler scheduler, IdMapService idMapService, OakBacklogClusterSyncService oakBacklogClusterSyncService, SyncTokenService syncTokenService, ResourceResolverFactory factory) -
handleIsolatedFromTopology
protected void handleIsolatedFromTopology()- Specified by:
handleIsolatedFromTopology
in classBaseDiscoveryService
-
activate
protected void activate(org.osgi.framework.BundleContext bundleContext) Activate this service -
deactivate
protected void deactivate()Deactivate this service -
bindTopologyEventListener
bind a topology event listener -
unbindTopologyEventListener
Unbind a topology event listener -
bindPropertyProvider
Bind a new property provider. -
updatedPropertyProvider
Update a property provider. -
unbindPropertyProvider
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
- Specified by:
getClusterViewService
in classBaseDiscoveryService
-
getAnnouncementRegistry
- Specified by:
getAnnouncementRegistry
in classBaseDiscoveryService
-
getViewStateManager
for testing only- Returns:
-