// only one cache loader may have fetchPersistentState to true.
int numLoadersWithFetchPersistentState = 0;
for (LoaderConfiguration cfg : clmConfig.cacheLoaders()) {
if (cfg instanceof StoreConfiguration) {
StoreConfiguration scfg = (StoreConfiguration) 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);