Package org.infinispan.configuration.cache

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


         @Override
         public void call() {
            ConfigurationBuilder builder = new ConfigurationBuilder();
            builder.invocationBatching().disable();
            Configuration newConfig = cm.defineConfiguration("new-cache", builder.build());
            assert !newConfig.invocationBatching().enabled();

            builder = new ConfigurationBuilder();
            builder.invocationBatching().enable();
            Configuration newConfig2 = cm.defineConfiguration("new-cache", builder.build());
            assert newConfig2.invocationBatching().enabled();
View Full Code Here


            assert !newConfig.invocationBatching().enabled();

            builder = new ConfigurationBuilder();
            builder.invocationBatching().enable();
            Configuration newConfig2 = cm.defineConfiguration("new-cache", builder.build());
            assert newConfig2.invocationBatching().enabled();
            assert cm.getCache("new-cache").getCacheConfiguration().invocationBatching().enabled();
         }
      });
   }
View Full Code Here

            assertTrue(externalizer instanceof AdvancedExternalizerTest.IdViaAnnotationObj.Externalizer);
            assertEquals(ShutdownHookBehavior.DONT_REGISTER, g.shutdown().hookBehavior());

            // Default cache is "local" named cache
            Configuration c = cm.getCache().getCacheConfiguration();
            assertFalse(c.invocationBatching().enabled());
            assertTrue(c.jmxStatistics().enabled());
            assertEquals(CacheMode.LOCAL, c.clustering().cacheMode());
            assertEquals(30000, c.locking().lockAcquisitionTimeout());
            assertEquals(2000, c.locking().concurrencyLevel());
            assertEquals(IsolationLevel.NONE, c.locking().isolationLevel());
View Full Code Here

            assertEquals(1, fileStore.async().threadPoolSize());
            assertEquals(Index.NONE, c.indexing().index());

            c = cm.getCache("invalid").getCacheConfiguration();
            assertEquals(CacheMode.INVALIDATION_ASYNC, c.clustering().cacheMode());
            assertTrue(c.invocationBatching().enabled());
            assertEquals(10, c.clustering().async().replQueueInterval());
            assertEquals(1000, c.clustering().async().replQueueMaxElements());
            assertTrue(c.clustering().async().asyncMarshalling());
            assertTrue(c.jmxStatistics().enabled());
            assertEquals(30500, c.locking().lockAcquisitionTimeout());
View Full Code Here

            assertEquals(11, c.expiration().maxIdle());
            assertEquals(Index.NONE, c.indexing().index());

            c = cm.getCache("repl").getCacheConfiguration();
            assertEquals(CacheMode.REPL_ASYNC, c.clustering().cacheMode());
            assertTrue(c.invocationBatching().enabled());
            assertEquals(11, c.clustering().async().replQueueInterval());
            assertEquals(1500, c.clustering().async().replQueueMaxElements());
            assertFalse(c.clustering().async().asyncMarshalling());
            assertTrue(c.jmxStatistics().enabled());
            assertEquals(31000, c.locking().lockAcquisitionTimeout());
View Full Code Here

            assertTrue(clusterLoader.preload());
            assertEquals(Index.NONE, c.indexing().index());

            c = cm.getCache("dist").getCacheConfiguration();
            assertEquals(CacheMode.DIST_SYNC, c.clustering().cacheMode());
            assertFalse(c.invocationBatching().enabled());
            assertEquals(1200000, c.clustering().l1().lifespan());
            assertEquals(4, c.clustering().hash().numOwners());
            assertEquals(35000, c.clustering().sync().replTimeout());
            assertEquals(2, c.clustering().hash().numSegments());
            assertTrue(c.clustering().hash().consistentHashFactory() instanceof SyncConsistentHashFactory);
View Full Code Here

            assertEquals(Index.NONE, c.indexing().index());

            c = cm.getCache("HibernateSearch-LuceneIndexesMetadata").getCacheConfiguration();
            assertEquals(CacheMode.REPL_SYNC, c.clustering().cacheMode());
            assertEquals(TransactionMode.TRANSACTIONAL, c.transaction().transactionMode()); // Non XA
            assertTrue(c.invocationBatching().enabled());
            assertTrue(c.transaction().useSynchronization()); // Non XA
            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());
View Full Code Here

            assertFalse(fileStore.purgeOnStartup());

            c = cm.getCache("HibernateSearch-LuceneIndexesData").getCacheConfiguration();
            assertEquals(CacheMode.REPL_SYNC, c.clustering().cacheMode());
            assertEquals(TransactionMode.TRANSACTIONAL, c.transaction().transactionMode()); // Non XA
            assertTrue(c.invocationBatching().enabled());
            assertTrue(c.transaction().useSynchronization()); // Non XA
            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());
View Full Code Here

            assertFalse(fileStore.purgeOnStartup());

            c = cm.getCache("HibernateSearch-LuceneIndexesLocking").getCacheConfiguration();
            assertEquals(CacheMode.REPL_SYNC, c.clustering().cacheMode());
            assertEquals(TransactionMode.TRANSACTIONAL, c.transaction().transactionMode()); // Non XA
            assertTrue(c.invocationBatching().enabled());
            assertTrue(c.transaction().useSynchronization()); // Non XA
            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());
View Full Code Here

        EmbeddedCacheManager container = this.container.getValue();
        @SuppressWarnings("unchecked")
        Registry<String, Void> jvmRouteRegistry = this.registry.getValue();
        Configuration config = this.config.getValue();

        if (!config.invocationBatching().enabled()) {
            ServiceName cacheServiceName = this.getCacheServiceName(manager.getReplicationConfig());
            throw new ClusteringNotSupportedException(MESSAGES.failedToConfigureWebApp(cacheServiceName.getParent().getSimpleName(), cacheServiceName.getSimpleName()));
        }

        String name = manager.getName();
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.