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 voidactivate(org.osgi.framework.BundleContext bundleContext) Activate this serviceprotected voidbindPropertyProvider(PropertyProvider propertyProvider, Map<String, Object> props) Bind a new property provider.protected voidbindTopologyEventListener(TopologyEventListener eventListener) bind a topology event listenervoidCheck the current topology for any potential changeprotected voidDeactivate this serviceprotected AnnouncementRegistryprotected ClusterViewServicefor testing onlyprotected voidvoidHandle the fact that the topology has started to change - inform the listeners asapstatic OakDiscoveryServicetestConstructor(SlingSettingsService settingsService, AnnouncementRegistry announcementRegistry, ConnectorRegistry connectorRegistry, ClusterViewService clusterViewService, Config config, OakViewChecker connectorPinger, Scheduler scheduler, IdMapService idMapService, OakBacklogClusterSyncService oakBacklogClusterSyncService, SyncTokenService syncTokenService, ResourceResolverFactory factory) protected voidunbindPropertyProvider(PropertyProvider propertyProvider, Map<String, Object> props) Unbind a property providerprotected voidunbindTopologyEventListener(TopologyEventListener eventListener) Unbind a topology event listenerprotected voidupdatedPropertyProvider(PropertyProvider propertyProvider, Map<String, Object> props) Update a property provider.voidUpdate 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:
handleIsolatedFromTopologyin 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:
getClusterViewServicein classBaseDiscoveryService
-
getAnnouncementRegistry
- Specified by:
getAnnouncementRegistryin classBaseDiscoveryService
-
getViewStateManager
for testing only- Returns:
-