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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
Returns the current, local cluster view - throwing an UndefinedClusterViewException if it cannot determine a clusterView at the moment.protected ResourceResolver
the sling id of the local instancestatic OakClusterViewService
testConstructor
(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:ClusterViewService
the sling id of the local instance- Specified by:
getSlingId
in interfaceClusterViewService
-
getResourceResolver
- Throws:
LoginException
-
getLocalClusterView
Description copied from interface:ClusterViewService
Returns the current, local cluster view - throwing an UndefinedClusterViewException if it cannot determine a clusterView at the moment.- Specified by:
getLocalClusterView
in 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)
-