org.apache.sling.discovery.impl.cluster
Class ClusterViewServiceImpl

java.lang.Object
  extended by org.apache.sling.discovery.impl.cluster.ClusterViewServiceImpl
All Implemented Interfaces:
ClusterViewService

@Service(value=ClusterViewService.class)
public class ClusterViewServiceImpl
extends Object
implements ClusterViewService

Default implementation of the ClusterViewService interface.

This class is a reader only - it accesses the repository to read the currently established view


Constructor Summary
ClusterViewServiceImpl()
           
 
Method Summary
 boolean contains(String slingId)
          checks whether the cluster view contains a particular sling id
 boolean containsAny(Collection<org.apache.sling.discovery.InstanceDescription> listInstances)
          checks whether the cluster contains any of the provided instances
 org.apache.sling.discovery.ClusterView getClusterView()
          the current cluster view
 String getIsolatedClusterViewId()
          the view id of the cluster view when isolated - ie before any view is established
 String getSlingId()
          the sling id of the local instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterViewServiceImpl

public ClusterViewServiceImpl()
Method Detail

getIsolatedClusterViewId

public String getIsolatedClusterViewId()
Description copied from interface: ClusterViewService
the view id of the cluster view when isolated - ie before any view is established

Specified by:
getIsolatedClusterViewId in interface ClusterViewService

getSlingId

public String getSlingId()
Description copied from interface: ClusterViewService
the sling id of the local instance

Specified by:
getSlingId in interface ClusterViewService

contains

public boolean contains(String slingId)
Description copied from interface: ClusterViewService
checks whether the cluster view contains a particular sling id

Specified by:
contains in interface ClusterViewService

containsAny

public boolean containsAny(Collection<org.apache.sling.discovery.InstanceDescription> listInstances)
Description copied from interface: ClusterViewService
checks whether the cluster contains any of the provided instances

Specified by:
containsAny in interface ClusterViewService

getClusterView

public org.apache.sling.discovery.ClusterView getClusterView()
Description copied from interface: ClusterViewService
the current cluster view

Specified by:
getClusterView in interface ClusterViewService


Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.