Package org.apache.sling.discovery.base.commons

# Interface ClusterViewService

public interface ClusterViewService
The ClusterViewService is capable of determining the ClusterView of the local cluster (ie of the instances that are all hooked to the same underlying repository).

## Method Summary

Modifier and Type
Method
Description
`org.apache.sling.discovery.commons.providers.spi.LocalClusterView`
`getLocalClusterView()`
Returns the current, local cluster view - throwing an UndefinedClusterViewException if it cannot determine a clusterView at the moment.
`String`
`getSlingId()`
the sling id of the local instance

## Method Details

### getSlingId

String getSlingId()
the sling id of the local instance

### getLocalClusterView

org.apache.sling.discovery.commons.providers.spi.LocalClusterView getLocalClusterView() throws UndefinedClusterViewException
Returns the current, local cluster view - throwing an UndefinedClusterViewException if it cannot determine a clusterView at the moment.

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)