Package org.infinispan.configuration.cache

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


            assertTrue(c.transaction().syncCommitPhase()); // Non XA - default configuration value
            assertTrue(c.transaction().syncRollbackPhase()); // Non XA - side effect of cache manager creation
            assertEquals(EvictionStrategy.NONE, c.eviction().strategy());
            assertEquals(-1, c.eviction().maxEntries());
            assertEquals(LockingMode.PESSIMISTIC, c.transaction().lockingMode());
            fileStore = (SingleFileStoreConfiguration) c.persistence().stores().get(0);
            assertTrue(fileStore.preload());
            assertFalse(fileStore.purgeOnStartup());

            c = cm.getCache("capedwarf-tasks").getCacheConfiguration();
            assertEquals(CacheMode.DIST_ASYNC, c.clustering().cacheMode());
View Full Code Here


            assertFalse(c.transaction().recovery().enabled()); // Non XA
            assertTrue(c.transaction().syncCommitPhase()); // Non XA - default configuration value
            assertTrue(c.transaction().syncRollbackPhase()); // Non XA - side effect of cache manager creation
            assertEquals(EvictionStrategy.LIRS, c.eviction().strategy());
            assertEquals(10000, c.eviction().maxEntries());
            fileStore = (SingleFileStoreConfiguration) c.persistence().stores().get(1);
            assertTrue(fileStore.preload());
            assertFalse(fileStore.purgeOnStartup());
            assertEquals(Index.NONE, c.indexing().index());

            c = cm.getCache("HibernateSearch-LuceneIndexesMetadata").getCacheConfiguration();
View Full Code Here

            assertFalse(c.transaction().recovery().enabled()); // Non XA
            assertTrue(c.transaction().syncCommitPhase()); // Non XA - default configuration value
            assertTrue(c.transaction().syncRollbackPhase()); // Non XA - side effect of cache manager creation
            assertEquals(EvictionStrategy.NONE, c.eviction().strategy());
            assertEquals(-1, c.eviction().maxEntries());
            fileStore = (SingleFileStoreConfiguration) c.persistence().stores().get(1);
            assertTrue(fileStore.preload());
            assertFalse(fileStore.purgeOnStartup());

            c = cm.getCache("HibernateSearch-LuceneIndexesData").getCacheConfiguration();
            assertEquals(CacheMode.REPL_SYNC, c.clustering().cacheMode());
View Full Code Here

            assertFalse(c.transaction().recovery().enabled()); // Non XA
            assertTrue(c.transaction().syncCommitPhase()); // Non XA - default configuration value
            assertTrue(c.transaction().syncRollbackPhase()); // Non XA - side effect of cache manager creation
            assertEquals(EvictionStrategy.NONE, c.eviction().strategy());
            assertEquals(-1, c.eviction().maxEntries());
            fileStore = (SingleFileStoreConfiguration) c.persistence().stores().get(1);
            assertTrue(fileStore.preload());
            assertFalse(fileStore.purgeOnStartup());

            c = cm.getCache("HibernateSearch-LuceneIndexesLocking").getCacheConfiguration();
            assertEquals(CacheMode.REPL_SYNC, c.clustering().cacheMode());
View Full Code Here

            .persistence()
               .addStore(DummyInMemoryStoreConfigurationBuilder.class)
            .persistence()
               .clearStores()
         .build();
      assertEquals(c.persistence().stores().size(), 0);
   }

   @Test(expectedExceptions = CacheConfigurationException.class)
   public void testClusterNameNull() {
      GlobalConfigurationBuilder gc = new GlobalConfigurationBuilder();
View Full Code Here

      c = cm.getCacheConfiguration("storeAsBinary");
      assertTrue(c.storeAsBinary().enabled());

      c = cm.getCacheConfiguration("withFileStore");
      assertTrue(c.persistence().preload());
      assertTrue(!c.persistence().passivation());
      assertEquals(1, c.persistence().stores().size());

      SingleFileStoreConfiguration loaderCfg = (SingleFileStoreConfiguration) c.persistence().stores().get(0);
View Full Code Here

      c = cm.getCacheConfiguration("storeAsBinary");
      assertTrue(c.storeAsBinary().enabled());

      c = cm.getCacheConfiguration("withFileStore");
      assertTrue(c.persistence().preload());
      assertTrue(!c.persistence().passivation());
      assertEquals(1, c.persistence().stores().size());

      SingleFileStoreConfiguration loaderCfg = (SingleFileStoreConfiguration) c.persistence().stores().get(0);

      assertTrue(loaderCfg.fetchPersistentState());
View Full Code Here

      assertTrue(c.storeAsBinary().enabled());

      c = cm.getCacheConfiguration("withFileStore");
      assertTrue(c.persistence().preload());
      assertTrue(!c.persistence().passivation());
      assertEquals(1, c.persistence().stores().size());

      SingleFileStoreConfiguration loaderCfg = (SingleFileStoreConfiguration) c.persistence().stores().get(0);

      assertTrue(loaderCfg.fetchPersistentState());
      assertTrue(loaderCfg.ignoreModifications());
View Full Code Here

      c = cm.getCacheConfiguration("withFileStore");
      assertTrue(c.persistence().preload());
      assertTrue(!c.persistence().passivation());
      assertEquals(1, c.persistence().stores().size());

      SingleFileStoreConfiguration loaderCfg = (SingleFileStoreConfiguration) c.persistence().stores().get(0);

      assertTrue(loaderCfg.fetchPersistentState());
      assertTrue(loaderCfg.ignoreModifications());
      assertTrue(loaderCfg.purgeOnStartup());
      assertEquals("/tmp/FileCacheStore-Location", loaderCfg.location());
View Full Code Here

      assertEquals(15000, loaderCfg.async().flushLockTimeout());
      assertTrue(loaderCfg.async().enabled());
      assertEquals(700, loaderCfg.async().modificationQueueSize());

      c = cm.getCacheConfiguration("withClusterLoader");
      assertEquals(1, c.persistence().stores().size());
      ClusterLoaderConfiguration clusterLoaderCfg = (ClusterLoaderConfiguration) c.persistence().stores().get(0);
      assertEquals(15000, clusterLoaderCfg.remoteCallTimeout());

      c = cm.getCacheConfiguration("withLoaderDefaults");
      loaderCfg = (SingleFileStoreConfiguration) c.persistence().stores().get(0);
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.