Search in sources :

Example 1 with DummyInMemoryStoreConfiguration

use of org.infinispan.persistence.dummy.DummyInMemoryStoreConfiguration in project infinispan by infinispan.

the class XmlFileParsingTest method testDummyInMemoryStore.

public void testDummyInMemoryStore() {
    String config = TestingUtil.wrapXMLWithoutSchema("<cache-container default-cache=\"default\">" + "  <local-cache name=\"default\">\n" + "    <persistence >\n" + "      <dummy-store xmlns=\"urn:infinispan:config:store:dummy:" + Version.getSchemaVersion() + "\" store-name=\"myStore\" />\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 DummyInMemoryStoreConfiguration);
    DummyInMemoryStoreConfiguration dummyInMemoryStoreConfiguration = (DummyInMemoryStoreConfiguration) storeConfiguration;
    assertEquals("myStore", dummyInMemoryStoreConfiguration.storeName());
}
Also used : PersistenceConfiguration(org.infinispan.configuration.cache.PersistenceConfiguration) ConfigurationBuilderHolder(org.infinispan.configuration.parsing.ConfigurationBuilderHolder) DummyInMemoryStoreConfiguration(org.infinispan.persistence.dummy.DummyInMemoryStoreConfiguration) SoftIndexFileStoreConfiguration(org.infinispan.persistence.sifs.configuration.SoftIndexFileStoreConfiguration) AbstractStoreConfiguration(org.infinispan.configuration.cache.AbstractStoreConfiguration) StoreConfiguration(org.infinispan.configuration.cache.StoreConfiguration) DummyInMemoryStoreConfiguration(org.infinispan.persistence.dummy.DummyInMemoryStoreConfiguration)

Aggregations

AbstractStoreConfiguration (org.infinispan.configuration.cache.AbstractStoreConfiguration)1 PersistenceConfiguration (org.infinispan.configuration.cache.PersistenceConfiguration)1 StoreConfiguration (org.infinispan.configuration.cache.StoreConfiguration)1 ConfigurationBuilderHolder (org.infinispan.configuration.parsing.ConfigurationBuilderHolder)1 DummyInMemoryStoreConfiguration (org.infinispan.persistence.dummy.DummyInMemoryStoreConfiguration)1 SoftIndexFileStoreConfiguration (org.infinispan.persistence.sifs.configuration.SoftIndexFileStoreConfiguration)1