Package org.infinispan.configuration.cache

Examples of org.infinispan.configuration.cache.Configuration.indexing()


            assertEquals(properties.getProperty("hibernate.search.default.reader.strategy"), "shared");
            assertEquals(properties.getProperty("hibernate.search.default.indexmanager"), "near-real-time");
            assertEquals(properties.getProperty("hibernate.search.default.directory_provider"), "filesystem");
           
            cacheConfiguration = cm.getCacheConfiguration("dist-with-default");
            properties = cacheConfiguration.indexing().properties();
           
            assertFalse(properties.isEmpty());
            assertEquals(properties.getProperty("hibernate.search.default.directory_provider"), "infinispan");
            assertEquals(properties.getProperty("hibernate.search.default.indexmanager"), "org.infinispan.query.indexmanager.InfinispanIndexManager");
            assertEquals(properties.getProperty("hibernate.search.default.exclusive_index_use"), "true");
View Full Code Here


   public void testOverrideIndexing() throws Exception {
      withCacheManager(new CacheManagerCallable(TestCacheManagerFactory.fromXml("configs/named-cache-override-test.xml")) {
         @Override
         public void call() {
            Configuration cnf = cm.getCacheConfiguration(simpleCacheName);
            Assert.assertFalse(cnf.indexing().index().isEnabled());

            Configuration conf = new ConfigurationBuilder().indexing().index(Index.NONE)
                  .addProperty("default.directory_provider", "infinispan").build();

            cm.defineConfiguration(simpleCacheName, conf);
View Full Code Here

   public void testConfigurationFileParsing() throws IOException {
      ParserRegistry parserRegistry = new ParserRegistry(Thread.currentThread().getContextClassLoader());
      ConfigurationBuilderHolder holder = parserRegistry.parseFile("configuration-parsing-test.xml");
      Configuration defaultConfiguration = holder.getDefaultConfigurationBuilder().build();

      assert defaultConfiguration.indexing().properties().size() == 0;
      assert !defaultConfiguration.indexing().index().isEnabled();

      final Map<String, ConfigurationBuilder> namedConfigurations = holder.getNamedConfigurationBuilders();

      final Configuration simpleCfg = namedConfigurations.get("simple").build();
View Full Code Here

      ParserRegistry parserRegistry = new ParserRegistry(Thread.currentThread().getContextClassLoader());
      ConfigurationBuilderHolder holder = parserRegistry.parseFile("configuration-parsing-test.xml");
      Configuration defaultConfiguration = holder.getDefaultConfigurationBuilder().build();

      assert defaultConfiguration.indexing().properties().size() == 0;
      assert !defaultConfiguration.indexing().index().isEnabled();

      final Map<String, ConfigurationBuilder> namedConfigurations = holder.getNamedConfigurationBuilders();

      final Configuration simpleCfg = namedConfigurations.get("simple").build();
      assert !simpleCfg.indexing().index().isEnabled();
View Full Code Here

      assert !defaultConfiguration.indexing().index().isEnabled();

      final Map<String, ConfigurationBuilder> namedConfigurations = holder.getNamedConfigurationBuilders();

      final Configuration simpleCfg = namedConfigurations.get("simple").build();
      assert !simpleCfg.indexing().index().isEnabled();
      assert simpleCfg.indexing().properties().size() == 0;

      final Configuration memoryCfg = namedConfigurations.get("memory-searchable").build();
      assert memoryCfg.indexing().index().isEnabled();
      assert memoryCfg.indexing().properties().size() == 2;
View Full Code Here

      final Map<String, ConfigurationBuilder> namedConfigurations = holder.getNamedConfigurationBuilders();

      final Configuration simpleCfg = namedConfigurations.get("simple").build();
      assert !simpleCfg.indexing().index().isEnabled();
      assert simpleCfg.indexing().properties().size() == 0;

      final Configuration memoryCfg = namedConfigurations.get("memory-searchable").build();
      assert memoryCfg.indexing().index().isEnabled();
      assert memoryCfg.indexing().properties().size() == 2;
      assert memoryCfg.indexing().properties().getProperty("default.directory_provider").equals("ram");
View Full Code Here

      final Configuration simpleCfg = namedConfigurations.get("simple").build();
      assert !simpleCfg.indexing().index().isEnabled();
      assert simpleCfg.indexing().properties().size() == 0;

      final Configuration memoryCfg = namedConfigurations.get("memory-searchable").build();
      assert memoryCfg.indexing().index().isEnabled();
      assert memoryCfg.indexing().properties().size() == 2;
      assert memoryCfg.indexing().properties().getProperty("default.directory_provider").equals("ram");

      final Configuration diskCfg = namedConfigurations.get("disk-searchable").build();
      assert diskCfg.indexing().index().isEnabled();
View Full Code Here

      assert !simpleCfg.indexing().index().isEnabled();
      assert simpleCfg.indexing().properties().size() == 0;

      final Configuration memoryCfg = namedConfigurations.get("memory-searchable").build();
      assert memoryCfg.indexing().index().isEnabled();
      assert memoryCfg.indexing().properties().size() == 2;
      assert memoryCfg.indexing().properties().getProperty("default.directory_provider").equals("ram");

      final Configuration diskCfg = namedConfigurations.get("disk-searchable").build();
      assert diskCfg.indexing().index().isEnabled();
      assert diskCfg.indexing().properties().size() == 3;
View Full Code Here

      assert simpleCfg.indexing().properties().size() == 0;

      final Configuration memoryCfg = namedConfigurations.get("memory-searchable").build();
      assert memoryCfg.indexing().index().isEnabled();
      assert memoryCfg.indexing().properties().size() == 2;
      assert memoryCfg.indexing().properties().getProperty("default.directory_provider").equals("ram");

      final Configuration diskCfg = namedConfigurations.get("disk-searchable").build();
      assert diskCfg.indexing().index().isEnabled();
      assert diskCfg.indexing().properties().size() == 3;
      assert diskCfg.indexing().properties().getProperty("hibernate.search.default.directory_provider").equals("filesystem");
View Full Code Here

      assert memoryCfg.indexing().index().isEnabled();
      assert memoryCfg.indexing().properties().size() == 2;
      assert memoryCfg.indexing().properties().getProperty("default.directory_provider").equals("ram");

      final Configuration diskCfg = namedConfigurations.get("disk-searchable").build();
      assert diskCfg.indexing().index().isEnabled();
      assert diskCfg.indexing().properties().size() == 3;
      assert diskCfg.indexing().properties().getProperty("hibernate.search.default.directory_provider").equals("filesystem");
      assert diskCfg.indexing().properties().getProperty("hibernate.search.cats.exclusive_index_use").equals("true");
     
      final Configuration replDefaults = namedConfigurations.get("repl-with-default").build();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.