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 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 EmbeddedCacheManager createCacheManager() throws Exception { ConfigurationBuilder cfg = getDefaultStandaloneCacheConfig(true); cfg .transaction() .transactionMode(TransactionMode.TRANSACTIONAL) .indexing() .index(Index.ALL) .addIndexedEntity(Book.class) .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.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); }
@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); }
@Override protected EmbeddedCacheManager createCacheManager() throws Exception { ConfigurationBuilder cfg = getDefaultStandaloneCacheConfig(true); cfg .transaction() .transactionMode(TransactionMode.TRANSACTIONAL) .indexing() .index(Index.ALL) .addIndexedEntity(DynamicPropertiesEntity.class) .addProperty("default.directory_provider", "local-heap") .addProperty("lucene_version", "LUCENE_CURRENT"); return TestCacheManagerFactory.createCacheManager(cfg); }
@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); }
@Override protected EmbeddedCacheManager createCacheManager() throws Exception { ConfigurationBuilder cfg = getDefaultStandaloneCacheConfig(true); cfg .transaction() .transactionMode(TransactionMode.TRANSACTIONAL) .indexing() .index(Index.ALL) .addIndexedEntity(Person.class) .addProperty("default.directory_provider", "local-heap") .addProperty("lucene_version", "LUCENE_CURRENT"); cacheManager = TestCacheManagerFactory.createCacheManager(cfg); person1 = new Person(); person1.setName("Navin"); person1.setBlurb("Owns a macbook"); person1.setAge(20); return cacheManager; }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder cfg = TestCacheManagerFactory.getDefaultCacheConfiguration(true); cfg.transaction() .transactionMode(TransactionMode.TRANSACTIONAL) .indexing().index(Index.ALL) .addIndexedEntity(getModelFactory().getUserImplClass()) .addIndexedEntity(getModelFactory().getAccountImplClass()) .addIndexedEntity(getModelFactory().getTransactionImplClass()) .addProperty("default.directory_provider", "local-heap") .addProperty("lucene_version", "LUCENE_CURRENT"); createClusteredCaches(1, cfg); }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder cfg = TestCacheManagerFactory.getDefaultCacheConfiguration(true); cfg.transaction() .transactionMode(TransactionMode.TRANSACTIONAL) .indexing().index(Index.ALL) .addIndexedEntity(getModelFactory().getUserImplClass()) .addIndexedEntity(getModelFactory().getAccountImplClass()) .addIndexedEntity(getModelFactory().getTransactionImplClass()) .addProperty("default.directory_provider", "local-heap") .addProperty("lucene_version", "LUCENE_CURRENT"); createClusteredCaches(1, cfg); }
@Override protected void createCacheManagers() throws Throwable { ConfigurationBuilder cfg = TestCacheManagerFactory.getDefaultCacheConfiguration(true); cfg.transaction() .transactionMode(TransactionMode.TRANSACTIONAL) .indexing().index(Index.ALL) .addIndexedEntity(getModelFactory().getUserImplClass()) .addIndexedEntity(getModelFactory().getAccountImplClass()) .addIndexedEntity(getModelFactory().getTransactionImplClass()) .addProperty("default.directory_provider", "local-heap") .addProperty("lucene_version", "LUCENE_CURRENT"); createClusteredCaches(1, cfg); }
public void testCorrectShutdown() { CacheContainer cc = null; try { ConfigurationBuilder cfg = new ConfigurationBuilder(); cfg .transaction() .transactionMode(TransactionMode.TRANSACTIONAL) .indexing() .index(Index.ALL) .addIndexedEntity(Person.class) .addProperty("default.directory_provider", "local-heap") .addProperty("lucene_version", "LUCENE_CURRENT"); cc = TestCacheManagerFactory.createCacheManager(cfg); Cache<?, ?> cache = cc.getCache(); SearchIntegrator sfi = TestingUtil.extractComponent(cache, SearchIntegrator.class); assert ! sfi.isStopped(); cc.stop(); assert sfi.isStopped(); } finally { // proper cleanup for exceptional execution TestingUtil.killCacheManagers(cc); } }
@Override protected EmbeddedCacheManager createCacheManager() throws Exception { ConfigurationBuilder cfg = getDefaultStandaloneCacheConfig(true); cfg .customInterceptors() .addInterceptor() .after(EntryWrappingInterceptor.class) .interceptor(nastyInterceptor) .transaction() .transactionMode(TransactionMode.TRANSACTIONAL) .use1PcForAutoCommitTransactions(false) .indexing() .index(Index.ALL) .addIndexedEntity(Person.class) .addProperty("default.directory_provider", "local-heap") .addProperty("lucene_version", "LUCENE_CURRENT") .locking().isolationLevel(IsolationLevel.READ_COMMITTED); return TestCacheManagerFactory.createCacheManager(cfg); }