org.apache.sling.discovery.impl.common

## Class ViewHelper

- java.lang.Object
- - org.apache.sling.discovery.impl.common.ViewHelper

    public class ViewHelper
    extends Object

helper for views

### Constructor Summary

Constructors
Constructor and Description
`ViewHelper()`

### Method Summary

All Methods Static Methods Concrete Methods
`static Set<String>` `determineLiveInstances(org.apache.sling.api.resource.Resource clusterInstancesResource, Config config)` Return the list of cluster instances that are 'live', ie that have sent a heartbeat within the configured heartbeat timeout
`static View` `getEstablishedView(org.apache.sling.api.resource.ResourceResolver resourceResolver, Config config)` Return the currently established cluster view - or null if there is no cluster view established at the moment.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ViewHelper

    public ViewHelper()

### Method Detail

#### determineLiveInstances

    public static Set<String> determineLiveInstances(org.apache.sling.api.resource.Resource clusterInstancesResource,
                                                     Config config)

Return the list of cluster instances that are 'live', ie that have sent a heartbeat within the configured heartbeat timeout

Parameters:
  `clusterInstancesResource` -
  `config` -
Returns:

#### getEstablishedView

    public static View getEstablishedView(org.apache.sling.api.resource.ResourceResolver resourceResolver,
                                          Config config)

Return the currently established cluster view - or null if there is no cluster view established at the moment.

Parameters:
  `resourceResolver` -
Returns: