protected void configureCache(ConfigurationBuilder builder) { builder.indexing().index(Index.ALL) .addIndexedEntity(Person.class) .addProperty("default.directory_provider", "local-heap") .addProperty("lucene_version", "LUCENE_CURRENT"); }
private ConfigurationBuilder getIndexedConfigWithCustomCaches(String lockCache, String metadataCache, String dataCache) { ConfigurationBuilder cfg = getIndexedConfig(); cfg.indexing().index(Index.ALL) .addProperty("default.locking_cachename", lockCache) .addProperty("default.data_cachename", dataCache) .addProperty("default.metadata_cachename", metadataCache) .addProperty("lucene_version", "LUCENE_CURRENT"); return cfg; }
@Produces @ConfigureCache("urban-dictionary-cache") @UrbanDictionaryCache public Configuration specialCacheCfg(InjectionPoint injectionPoint) { log.info("Configuring urban-dictionary-cache..."); return new ConfigurationBuilder() .indexing() .autoConfig(true) .addProperty("default.directory_provider", "ram") .build(); } }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder cfg = TestCacheManagerFactory.getDefaultCacheConfiguration(true); cfg.transaction() .transactionMode(TransactionMode.TRANSACTIONAL) .indexing().index(Index.ALL) .addIndexedEntity(UserHS.class) .addIndexedEntity(AccountHS.class) .addIndexedEntity(TransactionHS.class) .addIndexedEntity(TheEntity.class) .addIndexedEntity(Book.class) .addProperty("default.directory_provider", "local-heap") .addProperty("lucene_version", "LUCENE_CURRENT"); createClusteredCaches(1, cfg); }
private ConfigurationBuilder getBaseConfig() { ConfigurationBuilder cfg = new ConfigurationBuilder(); cfg.clustering().cacheMode(CacheMode.REPL_SYNC).indexing().index(Index.ALL) .addProperty("default.indexmanager", "org.infinispan.query.indexmanager.InfinispanIndexManager") .addProperty("lucene_version", "LUCENE_CURRENT"); return cfg; }
private ConfigurationBuilder buildCacheConfig(String indexName) { ConfigurationBuilder cb = getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC, true); cb.indexing() .index(Index.ALL) //index also changes originated on other nodes, the index is not shared .addIndexedEntity(Person.class) .addProperty("default.directory_provider", "filesystem") .addProperty("error_handler", "org.infinispan.query.helper.StaticTestingErrorHandler") .addProperty("default.indexBase", TMP_DIR + File.separator + indexName) .addProperty("lucene_version", "LUCENE_CURRENT"); return cb; }
@Override protected void configureCache(ConfigurationBuilder builder) { super.configureCache(builder); builder.indexing().index(Index.PRIMARY_OWNER) .addProperty("default.directory_provider", "infinispan") .addProperty("default.indexmanager", "org.infinispan.query.indexmanager.InfinispanIndexManager") .addProperty("lucene_version", "LUCENE_CURRENT"); } }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder cacheCfg = getDefaultClusteredCacheConfig(CACHE_MODE, TX_ENABLED); cacheCfg.clustering().remoteTimeout(120000) .indexing().index(Index.PRIMARY_OWNER) .addIndexedEntity(Transaction.class) .addProperty("default.directory_provider", DIRECTORY_PROVIDER.toString()) .addProperty("default.indexmanager", INDEX_MANAGER.toString()) .addProperty("default.indexwriter.merge_factor", MERGE_FACTOR) .addProperty("hibernate.search.default.worker.execution", WORKER_MODE.toString()) .addProperty("error_handler", "org.infinispan.query.helper.StaticTestingErrorHandler") .addProperty("lucene_version", "LUCENE_CURRENT"); List<Cache<Integer, Transaction>> caches = createClusteredCaches(2, cacheCfg); cache1 = caches.get(0); cache2 = caches.get(1); massIndexer = Search.getSearchManager(cache1).getMassIndexer(); }
@Produces @ConfigureCache("jboss-books-cache") @JBossBooksCache public Configuration specialCacheCfg(InjectionPoint injectionPoint) { log.info("Configuring jboss-books-cache..."); return new ConfigurationBuilder() .indexing() .autoConfig(true) .addProperty("default.directory_provider", "ram") .build(); } }
protected EmbeddedCacheManager createCacheManager() throws Exception { ConfigurationBuilder cfg = getDefaultStandaloneCacheConfig(true); cfg.transaction().transactionMode(TransactionMode.TRANSACTIONAL) .indexing().index(Index.ALL) .addProperty("default.directory_provider", "local-heap") .addProperty("lucene_version", "LUCENE_CURRENT"); return TestCacheManagerFactory.createCacheManager(cfg); }
@Override protected EmbeddedCacheManager createCacheManager() throws Exception { ConfigurationBuilder cfg = getDefaultStandaloneCacheConfig(true); cfg.indexing().index(Index.ALL) .addIndexedEntity(Person.class) .addIndexedEntity(AnotherGrassEater.class) .addProperty("default.directory_provider", "filesystem") .addProperty("default.indexBase", indexDirectory) .addProperty("error_handler", "org.infinispan.query.helper.StaticTestingErrorHandler") .addProperty("lucene_version", "LUCENE_CURRENT"); return TestCacheManagerFactory.createCacheManager(cfg); }
@Override protected void configureCache(ConfigurationBuilder builder) { super.configureCache(builder); builder.indexing().index(Index.PRIMARY_OWNER) .addProperty("default.directory_provider", "infinispan") .addProperty("default.indexmanager", "org.infinispan.query.indexmanager.InfinispanIndexManager") .addProperty("lucene_version", "LUCENE_CURRENT"); } }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder cfg = TestCacheManagerFactory.getDefaultCacheConfiguration(true); cfg.transaction() .transactionMode(TransactionMode.TRANSACTIONAL) .indexing().index(Index.ALL) .addIndexedEntity(Person.class) .addProperty("default.directory_provider", "local-heap") .addProperty("lucene_version", "LUCENE_CURRENT"); createClusteredCaches(1, cfg); }
@Produces @ConfigureCache("currency-cache") @CurrencyCache public Configuration specialCacheCfg(InjectionPoint injectionPoint) { log.info("Configuring currency-cache..."); return new ConfigurationBuilder() .indexing() .autoConfig(true) .addProperty("default.directory_provider", "ram") .build(); } }
protected EmbeddedCacheManager createCacheManager() throws Exception { ConfigurationBuilder cfg = getDefaultStandaloneCacheConfig(true); cfg.transaction().transactionMode(TransactionMode.TRANSACTIONAL) .indexing().index(Index.ALL) .addProperty("default.directory_provider", "local-heap") .addProperty("lucene_version", "LUCENE_CURRENT"); return TestCacheManagerFactory.createCacheManager(cfg); }
protected ConfigurationBuilder getConfigurationBuilder() { ConfigurationBuilder cfgBuilder = new ConfigurationBuilder(); cfgBuilder.indexing().index(Index.ALL) .addIndexedEntity(Person.class) .addProperty("default.directory_provider", "local-heap") .addProperty("lucene_version", "LUCENE_CURRENT"); return cfgBuilder; }
@Override protected void configureCache(ConfigurationBuilder builder) { super.configureCache(builder); builder.indexing().index(Index.PRIMARY_OWNER) .addProperty("default.directory_provider", "infinispan") .addProperty("default.indexmanager", "org.infinispan.query.indexmanager.InfinispanIndexManager") .addProperty("lucene_version", "LUCENE_CURRENT"); } }
@Override protected EmbeddedCacheManager createCacheManager() throws Exception { ConfigurationBuilder cfg = getDefaultStandaloneCacheConfig(true); cfg.transaction() .transactionMode(TransactionMode.TRANSACTIONAL) .indexing().index(Index.ALL) .addIndexedEntity(UserHS.class) .addProperty("default.directory_provider", "local-heap") .addProperty("lucene_version", "LUCENE_CURRENT"); return TestCacheManagerFactory.createCacheManager(cfg); }
@Produces @ConfigureCache("default-cache") @DefaultCache public Configuration specialCacheCfg(InjectionPoint injectionPoint) { log.info("Configuring default-cache..."); return new ConfigurationBuilder() .indexing() .autoConfig(true) .addProperty("default.directory_provider", "ram") .build(); } }
private ConfigurationBuilder getIndexedConfig() { ConfigurationBuilder cfg = getBaseConfig(); cfg.indexing().index(Index.ALL) .addIndexedEntity(Person.class) .addIndexedEntity(AnotherGrassEater.class) .addProperty("default.directory_provider", "infinispan") .addProperty("lucene_version", "LUCENE_CURRENT"); return cfg; }