Package org.infinispan.configuration.cache

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


        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


      AssertJUnit
            .assertEquals(
                  "ConfigurationOverrides should have overridden default value with explicitly set InvocationBatchingEnabled property. However, it didn't.",
                  expectedInvocationBatchingEnabled,
                  configuration.invocationBatching().enabled());
   }

   public final void configurationOverridesShouldOverrideFetchInMemoryStatePropIfExplicitlySet()
         throws Exception {
      final boolean expectedFetchInMemoryState = true;
View Full Code Here

                .addDependency(containerServiceName, EmbeddedCacheManager.class, containerInjection)
                .setInitialMode(ServiceController.Mode.PASSIVE)
        ;

        Configuration config = builder.build();
        if (config.invocationBatching().enabled()) {
            cacheConfigurationDependencies.getTransactionManagerInjector().inject(BatchModeTransactionManager.getInstance());
        } else if (config.transaction().transactionMode() == org.infinispan.transaction.TransactionMode.TRANSACTIONAL) {
            configBuilder.addDependency(TxnServices.JBOSS_TXN_TRANSACTION_MANAGER, TransactionManager.class, cacheConfigurationDependencies.getTransactionManagerInjector());
            if (config.transaction().useSynchronization()) {
                configBuilder.addDependency(TxnServices.JBOSS_TXN_SYNCHRONIZATION_REGISTRY, TransactionSynchronizationRegistry.class, cacheConfigurationDependencies.getTransactionSynchronizationRegistryInjector());
View Full Code Here

   public void testDefineConfigurationTwice() {
      EmbeddedCacheManager cm = createLocalCacheManager(false);
      try {
         Configuration override = new ConfigurationBuilder().invocationBatching().enable().build();
         assert override.invocationBatching().enabled();
         assert cm.defineConfiguration("test1", override).invocationBatching().enabled();
         ConfigurationBuilder cb = new ConfigurationBuilder();
         cb.read(override);
         Configuration config = cb.build();
         assert config.invocationBatching().enabled();
View Full Code Here

         assert override.invocationBatching().enabled();
         assert cm.defineConfiguration("test1", override).invocationBatching().enabled();
         ConfigurationBuilder cb = new ConfigurationBuilder();
         cb.read(override);
         Configuration config = cb.build();
         assert config.invocationBatching().enabled();
         assert cm.defineConfiguration("test2", config).invocationBatching().enabled();
      } finally {
         cm.stop();
      }
   }
View Full Code Here

         @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

      timestamp = timeService.time();
   }

   private void resetCache(final Cache<Object, Object> cache) {
      Configuration configuration = SecurityActions.getCacheConfiguration(cache.getAdvancedCache());
      if (configuration.invocationBatching().enabled()) {
         cache.endBatch(false);
      }
      TransactionManager tm = cache.getAdvancedCache().getTransactionManager();
      try {
         if (tm.getTransaction() != null) {
View Full Code Here

               assert defaultConfig.transaction().syncRollbackPhase();
               assert defaultConfig.jmxStatistics().enabled();
               assert globalConfig.shutdown().hookBehavior().equals(ShutdownHookBehavior.DONT_REGISTER);
               assert globalConfig.asyncListenerExecutor().properties().get("maxThreads").equals("123");
               assert globalConfig.asyncListenerExecutor().properties().get("queueSize").equals("1020000");
               assert !defaultConfig.invocationBatching().enabled();
               assert globalConfig.serialization().marshaller().getClass().equals(VersionAwareMarshaller.class);
               assert defaultConfig.storeAsBinary().enabled();

               assert globalConfig.transport().clusterName().equals("JBossCache-cluster");
               assert defaultConfig.clustering().cacheMode().equals(CacheMode.INVALIDATION_SYNC);
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

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.