use of org.infinispan.commons.configuration.BasicConfiguration in project infinispan by infinispan.
the class RemoteCacheAdminTest method templateCreateRemoveTest.
public void templateCreateRemoveTest(Method m) {
String templateName = m.getName();
String xml = String.format("<infinispan><cache-container><distributed-cache name=\"%s\"/></cache-container></infinispan>", templateName);
BasicConfiguration template = new StringConfiguration(xml);
client(0).administration().withFlags(CacheContainerAdmin.AdminFlag.VOLATILE).createTemplate(templateName, template);
assertTrue(manager(0).getCacheConfigurationNames().contains(templateName));
assertTrue(manager(0).getCacheConfigurationNames().contains(templateName));
client(1).administration().removeTemplate(templateName);
assertFalse(manager(0).getCacheConfigurationNames().contains(templateName));
assertFalse(manager(0).getCacheConfigurationNames().contains(templateName));
}
use of org.infinispan.commons.configuration.BasicConfiguration in project micronaut-cache by micronaut-projects.
the class InfinispanCacheManager method getCache.
@NonNull
@Override
public SyncCache<RemoteCache<Object, Object>> getCache(String name) {
BasicConfiguration basicConfiguration = new ConfigurationBuilder().build();
RemoteCache<Object, Object> nativeCache = remoteCacheManager.administration().getOrCreateCache(name, basicConfiguration);
return new InfinispanSyncCache(conversionService, nativeCache);
}
use of org.infinispan.commons.configuration.BasicConfiguration in project infinispan by infinispan.
the class AnchoredKeysIT method testCreateAnchoredKeysCache.
@Test
public void testCreateAnchoredKeysCache() {
BasicConfiguration config = new StringConfiguration("<infinispan><cache-container><replicated-cache name=\"anchored2\">\n" + "<locking concurrency-level=\"100\" acquire-timeout=\"1000\"/>\n" + "<anchored-keys xmlns=\"urn:infinispan:config:anchored-keys:" + Version.getMajorMinor() + "\" enabled=\"true\"/>\n" + "</replicated-cache></cache-container></infinispan>");
RemoteCacheManager rcm = SERVER_TEST.hotrod().createRemoteCacheManager();
rcm.administration().createCache("anchored2", config);
test(rcm.getCache("anchored2"));
}
Aggregations