@Override
	public ModuleDefinition findDefinition(String name, ModuleType moduleType) {
		ModuleDefinition remoteDefinition = remoteRegistry.findDefinition(name, moduleType);
		if (remoteDefinition == null || remoteDefinition.isComposed()) {
			return remoteDefinition;
		}

		copyIfStale((SimpleModuleDefinition) remoteDefinition);
		return currentLocalDefinition(remoteDefinition);
	}
A ModuleRegistry that is configured with two delegates: a remote (source) and a local (target) registry. This registry will return
results that exist in the remote registry but will synchronize them with the local registry. Results returned are always
from the <em>local</em> registry (unless composed). Mutative operations go through to the remote repository though.

<p>This is useful as reading
Boot uber-jars requires local {@code java.io.File} access, but modules may reside in a remote registry (<i>e.g.</i>
backed by HDFS). For such a case, simply use this registry as the main registry, configuring it with the {@code hdfs://} registry as
its source and the {@code file://} one as its target.</p>

@since 1.2
@author Eric Bottard
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/module/SynchronizingModuleRegistry.java