Examples of fluent()


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

            .useSynchronization(useSynchronization)
            .lockingMode(lockingMode);
      c.fluent().hash()
            .rehashEnabled(false)
            .numOwners(3);
      c.fluent().clustering().l1().disable();
      return c;
   }


   protected Object beginAndPrepareTx(final Object k, final int cacheIndex) {
View Full Code Here

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

      return Configuration.CacheMode.REPL_SYNC;
   }

   protected void createCacheManagers() throws Throwable {
      Configuration cfg = getDefaultClusteredConfig(getCacheMode(), true);
      cfg.fluent().transactionManagerLookup(new DummyTransactionManagerLookup()).lockingMode(LockingMode.PESSIMISTIC);
      cfg.setLockAcquisitionTimeout(500);
      createClusteredCaches(2, "testcache", cfg);
      waitForClusterToForm("testcache");
   }
View Full Code Here

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

   @Override
   protected final void createCacheManagers() throws Throwable {
      assert cacheMode != null && lockingMode != null && useSynchronization != null;
      final Configuration config = getDefaultClusteredConfig(cacheMode, true);
      config.fluent().transaction()
            .transactionMode(TransactionMode.TRANSACTIONAL)
            .transactionManagerLookup(new DummyTransactionManagerLookup())
            .lockingMode(lockingMode)
            .useSynchronization(useSynchronization);
      config.fluent().hash().numOwners(3).locking().lockAcquisitionTimeout(2000L);
View Full Code Here

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

      config.fluent().transaction()
            .transactionMode(TransactionMode.TRANSACTIONAL)
            .transactionManagerLookup(new DummyTransactionManagerLookup())
            .lockingMode(lockingMode)
            .useSynchronization(useSynchronization);
      config.fluent().hash().numOwners(3).locking().lockAcquisitionTimeout(2000L);
      createCluster(config, 3);
      waitForClusterToForm();
   }

   protected interface Operation {
View Full Code Here

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

      return Configuration.CacheMode.REPL_SYNC;
   }

   protected void createCacheManagers() throws Throwable {
      Configuration cfg = getDefaultClusteredConfig(getCacheMode(), true);
      cfg.fluent().transaction().transactionManagerLookup(new DummyTransactionManagerLookup());
      cfg.setLockAcquisitionTimeout(500);
      cfg.setUseEagerLocking(true);
      createClusteredCaches(2, "testcache", cfg);
   }
View Full Code Here

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

@Test(groups="functional", testName = "replication.AsyncAPINonTxSyncReplTest")
public class AsyncAPINonTxSyncReplTest extends MultipleCacheManagersTest {
   @Override
   protected void createCacheManagers() throws Throwable {
      Configuration c = getConfig();
      c.fluent().transaction().autoCommit(false);
      createClusteredCaches(2, c);
   }

   protected Configuration getConfig() {
      return getDefaultClusteredConfig(sync() ? Configuration.CacheMode.REPL_SYNC : Configuration.CacheMode.REPL_ASYNC, false);
View Full Code Here

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

   protected Configuration.CacheMode cacheMode = Configuration.CacheMode.DIST_SYNC;

   @Override
   protected void createCacheManagers() throws Throwable {
      final Configuration c = getDefaultClusteredConfig(cacheMode, true);
      c.fluent().transaction().cacheStopTimeout(1);
      c.fluent().transaction().locking().lockAcquisitionTimeout(30000L);//timeouts are possible otherwise
      createCluster(c, 2);
      waitForClusterToForm();
      buildKeys();
   }
View Full Code Here

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

   @Override
   protected void createCacheManagers() throws Throwable {
      final Configuration c = getDefaultClusteredConfig(cacheMode, true);
      c.fluent().transaction().cacheStopTimeout(1);
      c.fluent().transaction().locking().lockAcquisitionTimeout(30000L);//timeouts are possible otherwise
      createCluster(c, 2);
      waitForClusterToForm();
      buildKeys();
   }
View Full Code Here

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

      cm.defineConfiguration("onlyFetchPersistent", cfg);
   }

   private Configuration createConfiguration(int id) {
      Configuration cfg = getDefaultClusteredConfig(Configuration.CacheMode.REPL_SYNC, true);
      cfg.fluent().clustering().stateRetrieval().fetchInMemoryState(false);
      CacheLoaderManagerConfig clmc = new CacheLoaderManagerConfig();
      CacheStoreConfig clc = new DummyInMemoryCacheStore.Cfg("store id: " + id);
      clmc.addCacheLoaderConfig(clc);
      clc.setFetchPersistentState(true);
      clmc.setShared(false);
View Full Code Here

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

      }
   }

   private CacheContainer getContainerWithCacheLoader() {
      Configuration cfg = new Configuration();
      cfg.fluent().transaction().transactionMode(TransactionMode.TRANSACTIONAL);
      cfg.getCacheLoaderManagerConfig().addCacheLoaderConfig(csConfig);
      return TestCacheManagerFactory.createCacheManager(cfg);
   }

   private void assertCacheEntry(Cache cache, String key, String value, long lifespanMillis, long maxIdleMillis) {
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.