Class OakClusterViewService
java.lang.Object
org.apache.sling.discovery.oak.cluster.OakClusterViewService
- All Implemented Interfaces:
ClusterViewService
Oak-based implementation of the ClusterViewService interface.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()Returns the current, local cluster view - throwing an UndefinedClusterViewException if it cannot determine a clusterView at the moment.protected ResourceResolverthe sling id of the local instancestatic OakClusterViewServicetestConstructor(SlingSettingsService settingsService, ResourceResolverFactory resourceResolverFactory, IdMapService idMapService, Config config)
-
Constructor Details
-
OakClusterViewService
public OakClusterViewService()
-
-
Method Details
-
testConstructor
public static OakClusterViewService testConstructor(SlingSettingsService settingsService, ResourceResolverFactory resourceResolverFactory, IdMapService idMapService, Config config) -
activate
public void activate() -
getSlingId
Description copied from interface:ClusterViewServicethe sling id of the local instance- Specified by:
getSlingIdin interfaceClusterViewService
-
getResourceResolver
- Throws:
LoginException
-
getLocalClusterView
Description copied from interface:ClusterViewServiceReturns the current, local cluster view - throwing an UndefinedClusterViewException if it cannot determine a clusterView at the moment.- Specified by:
getLocalClusterViewin interfaceClusterViewService- Returns:
- the current cluster view - never returns null (it rather throws an UndefinedClusterViewException that contains more details about why exactly the clusterView is undefined at the moment)
- Throws:
UndefinedClusterViewException- thrown when the ClusterView cannot be determined at the moment (also contains more details as to why exactly)
-