cm2 = addClusterEnabledCacheManager();
Configuration conf = getDefaultClusteredConfig(Configuration.CacheMode.REPL_SYNC);
DummyInMemoryCacheStore.Cfg cfg = new DummyInMemoryCacheStore.Cfg();
cfg.setStoreName("Store-" + storeCounter.getAndIncrement());
CacheLoaderManagerConfig pushingCfg = new CacheLoaderManagerConfig();
pushingCfg.addCacheLoaderConfig(cfg);
SingletonStoreConfig ssc = new SingletonStoreConfig();
ssc.setPushStateWhenCoordinator(true);
ssc.setSingletonStoreEnabled(true);
cfg.setSingletonStoreConfig(ssc);
conf.setCacheLoaderManagerConfig(pushingCfg);
// cannot define on ALL cache managers since the same dummy in memory CL bin will be used!
cm0.defineConfiguration("pushing", conf);
((DummyInMemoryCacheStore.Cfg) conf.getCacheLoaderManagerConfig().getFirstCacheLoaderConfig()).setStoreName("Store-" + storeCounter.getAndIncrement());
cm1.defineConfiguration("pushing", conf);
((DummyInMemoryCacheStore.Cfg) conf.getCacheLoaderManagerConfig().getFirstCacheLoaderConfig()).setStoreName("Store-" + storeCounter.getAndIncrement());
cm2.defineConfiguration("pushing", conf);
conf = getDefaultClusteredConfig(Configuration.CacheMode.REPL_SYNC);
cfg = new DummyInMemoryCacheStore.Cfg();
cfg.setStoreName("Store-" + storeCounter.getAndIncrement());
CacheLoaderManagerConfig nonPushingCfg = new CacheLoaderManagerConfig();
nonPushingCfg.addCacheLoaderConfig(cfg);
ssc = new SingletonStoreConfig();
ssc.setPushStateWhenCoordinator(false);
ssc.setSingletonStoreEnabled(true);
cfg.setSingletonStoreConfig(ssc);
conf.setCacheLoaderManagerConfig(nonPushingCfg);