/** * This implementation clones the configuration passed in before using it. * * @param configuration to use * @param start whether to start the cache * @return a cache * @throws ConfigurationException if there are problems with the cfg */ public Cache<K, V> createCache(Configuration configuration, boolean start) throws ConfigurationException { try { CacheSPI<K, V> cache = createAndWire(configuration); if (start) cache.start(); return cache; } catch (ConfigurationException ce) { throw ce; } catch (RuntimeException re) { throw re; } catch (Exception e) { throw new RuntimeException(e); } }