// initialize IndexerCacheLoader
IndexerCacheLoader indexerCacheLoader = new IndexerCacheLoader();
// inject dependencies
indexerCacheLoader.init(searchManager, parentSearchManager, handler, parentHandler);
// set SingltonStoreCacheLoader
SingletonStoreConfig singletonStoreConfig = new SingletonStoreConfig();
singletonStoreConfig.setSingletonStoreClass(IndexerSingletonStoreCacheLoader.class.getName());
//singletonStoreConfig.setSingletonStoreClass(SingletonStoreCacheLoader.class.getName());
Properties singletonStoreProperties = new Properties();
// try to get pushState parameters, since they are set programmatically only
Boolean pushState = config.getParameterBoolean(QueryHandlerParams.PARAM_JBOSSCACHE_PUSHSTATE, false);
Integer pushStateTimeOut =
config.getParameterInteger(QueryHandlerParams.PARAM_JBOSSCACHE_PUSHSTATE_TIMEOUT, 10000);
singletonStoreProperties.setProperty("pushStateWhenCoordinator", pushState.toString());
singletonStoreProperties.setProperty("pushStateWhenCoordinatorTimeout", pushStateTimeOut.toString());
singletonStoreConfig.setProperties(singletonStoreProperties);
singletonStoreConfig.setSingletonStoreEnabled(true);
// create CacheLoaderConfig
IndividualCacheLoaderConfig individualCacheLoaderConfig = new IndividualCacheLoaderConfig();
// set SingletonStoreConfig
individualCacheLoaderConfig.setSingletonStoreConfig(singletonStoreConfig);
// set CacheLoader