use of org.ff4j.store.FeatureStoreEhCache in project ff4j by ff4j.
the class FeatureStoreTerracottaTestIT method initStore.
/**
* {@inheritDoc}
*/
@Override
protected FeatureStore initStore() {
// Configuration to wirk with Terracotta
Configuration managerConfiguration = new Configuration();
managerConfiguration.name("config").terracotta(new TerracottaClientConfiguration().url(TERRACOTTA_URL)).defaultCache(new CacheConfiguration().maxBytesLocalHeap(128, MemoryUnit.MEGABYTES).terracotta(new TerracottaConfiguration())).cache(new CacheConfiguration().name(FF4jEhCacheWrapper.CACHENAME_FEATURES).maxBytesLocalHeap(128, MemoryUnit.MEGABYTES).terracotta(new TerracottaConfiguration()));
FeatureStoreEhCache ehcacheStore = new FeatureStoreEhCache(managerConfiguration);
ehcacheStore.importFeaturesFromXmlFile("ff4j.xml");
return ehcacheStore;
}
Aggregations