@Override
	public boolean delete(ModuleDefinition definition) {
		Assert.notNull(definition, "'definition' cannot be null.");
		if (!definition.isComposed()) {
			return false;
		}
		String path = Paths.build(Paths.MODULES, definition.getType().toString(), definition.getName());
		try {
			// Delete actual definition
			zooKeeperConnection.getClient().delete().deletingChildrenIfNeeded().forPath(path);

			// As well as dependencies bookkeeping
			List<ModuleDefinition> children = ((CompositeModuleDefinition) definition).getChildren();
			for (ModuleDefinition child : children) {
				ModuleDefinitionRepositoryUtils.deleteDependencies(moduleDependencyRepository, child,
						dependencyKey(definition));
			}
		}
		catch (KeeperException.NoNodeException ignore) {
			// We are not responsible for this definition
			return false;
		}
		catch (Exception e) {
			throw ZooKeeperUtils.wrapThrowable(e);
		}
		return true;
	}
A reference to the main module registry (which also typically contains this registry as a delegate),
used to re-hydrate {@link org.springframework.xd.module.SimpleModuleDefinition}s with locations that
make sense on this runtime(admin or container).
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/module/store/ZooKeeperComposedModuleDefinitionRegistry.java