int numLoadersWithFetchPersistentState = 0;
for (CacheLoaderConfiguration cfg : clmConfig.cacheLoaders()) {
if (cfg instanceof CacheStoreConfiguration) {
CacheStoreConfiguration scfg = (CacheStoreConfiguration) cfg;
assertNotSingletonAndShared(scfg);
if(scfg.fetchPersistentState()) numLoadersWithFetchPersistentState++;
}
if (numLoadersWithFetchPersistentState > 1)
throw new Exception("Invalid cache loader configuration!! Only ONE cache loader may have fetchPersistentState set to true. Cache will not start!");
CacheLoader l = createCacheLoader(LegacyConfigurationAdaptor.adapt(cfg), cache);