class SyncManager extends AbstractSyncManager {

	protected void doUpdateConfiguration()
			throws FloodlightModuleException {

		try {
			ClusterConfig oldConfig = clusterConfig;
			clusterConfig = clusterConfigProvider.getConfig();
			if (clusterConfig.equals(oldConfig)) return;

			logger.info("[{}] Updating sync configuration {}",
					clusterConfig.getNode().getNodeId(),
					clusterConfig);
			if (oldConfig.getNode() != null &&
					!clusterConfig.getNode().equals(oldConfig.getNode())) {
				logger.info("[{}] Local node configuration changed; restarting sync" +
						"service", oldConfig.getNode().getNodeId());
				shutdown();
				startUp(null);
			}

			for (Node n : clusterConfig.getNodes()) {
				Node existing = oldConfig.getNode(n.getNodeId());
				if (existing != null && !n.equals(existing)) {
					// we already had this node's configuration, but it's
					// changed.  Disconnect from the node and let it
					// reinitialize
					logger.info("[{}->{}] Configuration for node has changed",
							getLocalNodeId(), n.getNodeId());
					rpcService.disconnectNode(n.getNodeId());
				}
			}
			for (Node n : oldConfig.getNodes()) {
				Node nn = clusterConfig.getNode(n.getNodeId());
				if (nn == null) {
					// n is a node that doesn't appear in the new config
					logger.info("[{}->{}] Disconnecting deconfigured node",
							getLocalNodeId(), n.getNodeId());
					rpcService.disconnectNode(n.getNodeId());
				}
			}
		} catch (Exception e) {
			throw new FloodlightModuleException("Could not update " +
					"configuration", e);
		}
	}

}