if (loader instanceof LegacyLoaderAdapter<?>) {
return ((LegacyLoaderAdapter<?>)loader).adapt();
} else if (loader instanceof StoreConfiguration) {
if (loader instanceof LegacyStoreConfiguration) {
LegacyStoreConfiguration store = (LegacyStoreConfiguration) loader;
CacheLoader cacheStore = store.cacheStore(); // TODO: in 6.0, as we deprecate the LegacyConfigurationLoader#cacheLoader() method, narrow this type to CacheStore
clc = getLoaderConfig(loader, cacheStore);
}
CacheStoreConfig csc = (CacheStoreConfig) clc;
StoreConfiguration store = (StoreConfiguration) loader;
csc.fetchPersistentState(store.fetchPersistentState());
csc.ignoreModifications(store.ignoreModifications());
csc.purgeOnStartup(store.purgeOnStartup());
csc.setPurgeSynchronously(store.purgeSynchronously());
csc.getAsyncStoreConfig().setEnabled(store.async().enabled());
csc.getAsyncStoreConfig().flushLockTimeout(store.async().flushLockTimeout());
csc.getAsyncStoreConfig().modificationQueueSize(store.async().modificationQueueSize());
csc.getAsyncStoreConfig().shutdownTimeout(store.async().shutdownTimeout());
csc.getAsyncStoreConfig().threadPoolSize(store.async().threadPoolSize());
csc.getSingletonStoreConfig().enabled(store.singletonStore().enabled());
csc.getSingletonStoreConfig().pushStateTimeout(store.singletonStore().pushStateTimeout());
csc.getSingletonStoreConfig().pushStateWhenCoordinator(store.singletonStore().pushStateWhenCoordinator());
} else if (loader instanceof LegacyLoaderConfiguration) {
CacheLoader cacheLoader = ((LegacyLoaderConfiguration) loader).cacheLoader();
clc = getLoaderConfig(loader, cacheLoader);
}
if (clc instanceof AbstractCacheStoreConfig) {
AbstractCacheStoreConfig acsc = (AbstractCacheStoreConfig) clc;
Properties p = loader.properties();