CacheStoreConfig cfg = new DummyInMemoryCacheStore.Cfg()
.storeName("ChainingCacheLoaderTest_instance1")
.purgeOnStartup(false)
.fetchPersistentState(false);
store1 = new DummyInMemoryCacheStore();
store1.init(cfg, null, new TestObjectStreamMarshaller());
ConfigurationBuilder builder = new ConfigurationBuilder();
LegacyConfigurationAdaptor.adapt(Thread.currentThread().getContextClassLoader(), builder, cfg);
store.addCacheLoader(store1, builder.build().loaders().cacheLoaders().get(0));
store2 = new DummyInMemoryCacheStore();
// set store2 up for streaming
cfg = new DummyInMemoryCacheStore.Cfg()
.storeName("ChainingCacheLoaderTest_instance2")
.purgeOnStartup(false)
.fetchPersistentState(true);
store2.init(cfg, null, new TestObjectStreamMarshaller());
builder = new ConfigurationBuilder();
LegacyConfigurationAdaptor.adapt(Thread.currentThread().getContextClassLoader(), builder, cfg);
store.addCacheLoader(store2, builder.build().loaders().cacheLoaders().get(0));