Package org.infinispan.config

Examples of org.infinispan.config.Configuration.fluent()


public class RemoteLockCleanupTest extends MultipleCacheManagersTest {

   @Override
   protected void createCacheManagers() throws Throwable {
      Configuration config = getDefaultClusteredConfig(Configuration.CacheMode.DIST_SYNC, true);
      config.fluent().transaction().lockingMode(LockingMode.PESSIMISTIC);
      super.createClusteredCaches(2, config);
   }

   public void testLockCleanup() throws Exception {
      final DelayInterceptor interceptor = new DelayInterceptor();
View Full Code Here


public class LocalDldWithSyncTest extends LocalDeadlockDetectionTest {

   @Override
   protected Configuration createConfig() {
      Configuration config = super.createConfig();
      config.fluent().transaction().useSynchronization(true);
      return config;
   }
}
View Full Code Here

      cacheManager.getCache("syncAndRecovery");
   }

   public void testConfigOverride() {
      Configuration configuration = getDefaultStandaloneConfig(true);
      configuration.fluent().transaction().useSynchronization(true);
      cacheManager.defineConfiguration("newCache", configuration);
      assert cacheManager.getCache("newCache").getConfiguration().isUseSynchronizationForTransactions();
   }
}
View Full Code Here

      manager(1).getCacheNames().contains(getRecoveryCacheName());
   }

   protected Configuration  configure() {
      Configuration configuration = getDefaultClusteredConfig(Configuration.CacheMode.DIST_SYNC, true);
      configuration.fluent().locking().useLockStriping(false);
      configuration.fluent().transaction()
         .transactionManagerLookupClass(RecoveryDummyTransactionManagerLookup.class)
         .recovery();
      configuration.fluent().clustering().hash().rehashEnabled(false);
      return configuration;
View Full Code Here

   }

   protected Configuration  configure() {
      Configuration configuration = getDefaultClusteredConfig(Configuration.CacheMode.DIST_SYNC, true);
      configuration.fluent().locking().useLockStriping(false);
      configuration.fluent().transaction()
         .transactionManagerLookupClass(RecoveryDummyTransactionManagerLookup.class)
         .recovery();
      configuration.fluent().clustering().hash().rehashEnabled(false);
      return configuration;
   }
View Full Code Here

      Configuration configuration = getDefaultClusteredConfig(Configuration.CacheMode.DIST_SYNC, true);
      configuration.fluent().locking().useLockStriping(false);
      configuration.fluent().transaction()
         .transactionManagerLookupClass(RecoveryDummyTransactionManagerLookup.class)
         .recovery();
      configuration.fluent().clustering().hash().rehashEnabled(false);
      return configuration;
   }

   public void testSimpleTx() throws Exception{
      tm(0).begin();
View Full Code Here

   private Object response2;

   protected EmbeddedCacheManager createCacheManager() throws Exception {
      cacheManager = TestCacheManagerFactory.createLocalCacheManager(false);
      Configuration configuration = createConfig();
      configuration.fluent().transaction().lockingMode(LockingMode.PESSIMISTIC);
      cacheManager.defineConfiguration("test", configuration);
      cache = cacheManager.getCache("test");
      lockManager = (DeadlockDetectingLockManager) TestingUtil.extractLockManager(cache);
      return cacheManager;
   }
View Full Code Here

   public void setUp() {
      LockTestBaseTL tl = new LockTestBaseTL();
      Configuration defaultCfg = new Configuration();
      defaultCfg.setIsolationLevel(repeatableRead ? IsolationLevel.REPEATABLE_READ : IsolationLevel.READ_COMMITTED);
      defaultCfg.setLockAcquisitionTimeout(200); // 200 ms
      defaultCfg.fluent().transaction().transactionManagerLookup(new DummyTransactionManagerLookup());
      cm = TestCacheManagerFactory.createCacheManager(defaultCfg);
      tl.cache = cm.getCache();
      tl.lockManager = TestingUtil.extractComponentRegistry(tl.cache).getComponent(LockManager.class);
      tl.icc = TestingUtil.extractComponentRegistry(tl.cache).getComponent(InvocationContextContainer.class);
      tl.tm = TestingUtil.extractComponentRegistry(tl.cache).getComponent(TransactionManager.class);
View Full Code Here

public class InDoubtXidReturnedOnceTest extends MultipleCacheManagersTest {

   @Override
   protected void createCacheManagers() throws Throwable {
      Configuration configuration = getDefaultClusteredConfig(Configuration.CacheMode.DIST_SYNC, true);
      configuration.fluent().locking().useLockStriping(false);
      configuration.fluent().transaction()
         .transactionManagerLookupClass(RecoveryDummyTransactionManagerLookup.class)
         .recovery();
      configuration.fluent().clustering().hash().rehashEnabled(false);
      configuration.fluent().hash().numOwners(3);
View Full Code Here

   @Override
   protected void createCacheManagers() throws Throwable {
      Configuration configuration = getDefaultClusteredConfig(Configuration.CacheMode.DIST_SYNC, true);
      configuration.fluent().locking().useLockStriping(false);
      configuration.fluent().transaction()
         .transactionManagerLookupClass(RecoveryDummyTransactionManagerLookup.class)
         .recovery();
      configuration.fluent().clustering().hash().rehashEnabled(false);
      configuration.fluent().hash().numOwners(3);
      configuration.fluent().transaction().recovery();
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.