private void createNewView()

in src/main/java/org/apache/sling/discovery/impl/standalone/NoClusterDiscoveryService.java [106:130]


    private void createNewView(final Type eventType, boolean inform) {
        final TopologyEventListener[] registeredServices;
        final TopologyView newView;
        final TopologyView oldView;
        synchronized ( lock ) {
            // invalidate old view
            if ( this.currentTopologyView != null ) {
                this.currentTopologyView.invalidate();
                oldView = currentTopologyView;
            } else {
                oldView = null;
            }
            final InstanceDescription myInstanceDescription = new InstanceDescriptionImpl(this.settingsService.getSlingId(),
                    this.cachedProperties);
            this.currentTopologyView = new TopologyViewImpl(myInstanceDescription);
            registeredServices = this.listeners;
            newView = this.currentTopologyView;

            if ( inform ) {
                for(final TopologyEventListener da: registeredServices) {
                    da.handleTopologyEvent(new TopologyEvent(eventType, oldView, newView));
                }
            }
        }
    }