class Configuration {

    public RuntimeCfg setupFor(final CacheManager cacheManager, final String fallbackName) throws InvalidConfigurationException {
        if (cfg != null) {
            if (cfg.cacheManager == cacheManager) {
                return cfg;
            } else if (cfg.cacheManager.getStatus() != Status.STATUS_SHUTDOWN) {
                throw new IllegalStateException("You cannot share a Configuration instance across multiple running CacheManager instances");
            }
        }
        final Collection<ConfigError> errors = validate();
        if (!errors.isEmpty()) {
            throw new InvalidConfigurationException(errors);
        }
        cfg = new Configuration.RuntimeCfg(cacheManager, fallbackName);
        return cfg;
    }

    public  Configuration();

}