public void checkForLocalClusterViewChange()

in src/main/java/org/apache/sling/discovery/impl/DiscoveryServiceImpl.java [677:709]


    public void checkForLocalClusterViewChange() {
        viewStateManagerLock.lock();
        try{
            if (!activated) {
                logger.debug("checkForLocalClusterViewChange: not yet activated, ignoring");
                return;
            }
            try {
                ClusterViewService clusterViewService = getClusterViewService();
                if (clusterViewService == null) {
                    throw new UndefinedClusterViewException(
                            Reason.REPOSITORY_EXCEPTION,
                            "no ClusterViewService available at the moment");
                }
                LocalClusterView localClusterView = clusterViewService.getLocalClusterView();
            } catch (UndefinedClusterViewException e) {
                // SLING-5030 : when we're cut off from the local cluster we also
                // treat it as being cut off from the entire topology, ie we don't
                // update the announcements but just return
                // the previous oldView marked as !current
                logger.info("checkForLocalClusterViewChange: undefined cluster view: "+e.getReason()+"] "+e);
                getOldView().setNotCurrent();
                viewStateManager.handleChanging();
                if (e.getReason()==Reason.ISOLATED_FROM_TOPOLOGY) {
                    handleIsolatedFromTopology();
                }
            }
        } finally {
            if (viewStateManagerLock!=null) {
                viewStateManagerLock.unlock();
            }
        }
    }