this.providerFactory = providerFactory;
}
public void start()
{
CacheFactory factory = new DefaultCacheFactory();
ExpirationAlgorithmConfig exp = new ExpirationAlgorithmConfig();
exp.setMaxNodes(maxSize);
EvictionRegionConfig evictionRegionConfig = new EvictionRegionConfig(RegionManagerImpl.DEFAULT_REGION);
evictionRegionConfig.setEvictionAlgorithmConfig(exp);
EvictionConfig evictConfig = new EvictionConfig();
evictConfig.setDefaultEvictionRegionConfig(evictionRegionConfig);
evictConfig.setWakeupInterval(wakeupInterval);
Configuration config = new Configuration();
config.setCacheMode(Configuration.CacheMode.LOCAL);
config.setEvictionConfig(evictConfig);
cache = factory.createCache(config, true);
ServerCacheHitInterceptor hit = new ServerCacheHitInterceptor(this);
ServerCacheInterceptor interceptor = new ServerCacheInterceptor(this);
getProviderFactory().getServerPreProcessInterceptorRegistry().register(hit);