use of org.infinispan.configuration.cache.AbstractStoreConfiguration in project infinispan by infinispan.
the class AbstractConfigurationSerializerTest method compareStoreConfiguration.
protected void compareStoreConfiguration(String name, StoreConfiguration beforeStore, StoreConfiguration afterStore) {
if (beforeStore instanceof AbstractStoreConfiguration) {
AbstractStoreConfiguration beforeASC = (AbstractStoreConfiguration) beforeStore;
AbstractStoreConfiguration afterASC = (AbstractStoreConfiguration) afterStore;
compareAttributeSets(name, beforeASC.attributes(), afterASC.attributes());
compareAttributeSets(name, beforeASC.async().attributes(), afterASC.async().attributes());
} else {
throw new IllegalArgumentException("Cannot compare stores of type: " + beforeStore.getClass().getName());
}
}
use of org.infinispan.configuration.cache.AbstractStoreConfiguration in project infinispan by infinispan.
the class XmlFileParsingTest method testStoreWithNoConfigureBy.
public void testStoreWithNoConfigureBy() {
String config = TestingUtil.wrapXMLWithoutSchema("<cache-container default-cache=\"default\">" + " <local-cache name=\"default\">\n" + " <persistence >\n" + " <store class=\"org.infinispan.configuration.XmlFileParsingTest$GenericLoader\" preload=\"true\" fetch-state=\"true\" />\n" + " </persistence >\n" + " </local-cache>\n" + "</cache-container>");
ConfigurationBuilderHolder holder = parseStringConfiguration(config);
PersistenceConfiguration cfg = holder.getDefaultConfigurationBuilder().build().persistence();
StoreConfiguration storeConfiguration = cfg.stores().get(0);
assertTrue(storeConfiguration instanceof AbstractStoreConfiguration);
AbstractStoreConfiguration abstractStoreConfiguration = (AbstractStoreConfiguration) storeConfiguration;
assertTrue(abstractStoreConfiguration.fetchPersistentState());
assertTrue(abstractStoreConfiguration.preload());
}
Aggregations