Package org.infinispan.configuration.cache

Examples of org.infinispan.configuration.cache.ConfigurationBuilder.locking()



   @Override
   protected void createCacheManagers() throws Throwable {
      ConfigurationBuilder c = new ConfigurationBuilder();
      c
         .locking()
            .isolationLevel(IsolationLevel.READ_COMMITTED)
            .lockAcquisitionTimeout(60000)
            .useLockStriping(false)
         .clustering()
View Full Code Here


@Test(groups = "functional", testName = "api.RepeatableReadRemoteGetCountTest")
public class RepeatableReadRemoteGetCountTest extends MultipleCacheManagersTest {
   @Override
   protected void createCacheManagers() throws Throwable {
      ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, true);
      builder.locking().isolationLevel(IsolationLevel.REPEATABLE_READ).writeSkewCheck(false);
      builder.clustering().hash().numOwners(1);
      createClusteredCaches(2, builder);
   }

   public void testOnKeyInitialized() throws Exception {
View Full Code Here

public class FlagsEnabledTest extends MultipleCacheManagersTest {

   @Override
   protected void createCacheManagers() throws Throwable {
      ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC, true);
      builder
            .locking().writeSkewCheck(true).isolationLevel(IsolationLevel.REPEATABLE_READ)
            .versioning().enable().scheme(VersioningScheme.SIMPLE)
            .persistence().addStore(UnnecessaryLoadingTest.CountingStoreConfigurationBuilder.class)
            .persistence().addStore(DummyInMemoryStoreConfigurationBuilder.class)
            .transaction().syncCommitPhase(true);
View Full Code Here

   @Override
   protected EmbeddedCacheManager createCacheManager() throws Exception {
      // start a single cache instance
      ConfigurationBuilder cb = getDefaultStandaloneCacheConfig(true);
      cb.locking().isolationLevel(getIsolationLevel());
      addEviction(cb);
      amend(cb);
      EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(false);
      cm.defineConfiguration("test", cb.build());
      cache = cm.getCache("test");
View Full Code Here

   public static final class CustomInterceptor2 extends CommandInterceptor {}


   public void testCustomInterceptorsProgramatically() {
      ConfigurationBuilder cfg = new ConfigurationBuilder();
      cfg.locking().lockAcquisitionTimeout(1010);
      cfg.customInterceptors().addInterceptor().interceptor(new DummyInterceptor()).position(Position.FIRST);

      withCacheManager(new CacheManagerCallable(TestCacheManagerFactory.createCacheManager(cfg)) {
         @Override
         public void call() {
View Full Code Here

      });
   }

   public void testCustomInterceptorsProgramaticallyWithOverride() {
      final ConfigurationBuilder cfg = new ConfigurationBuilder();
      cfg.locking().lockAcquisitionTimeout(1010);
      cfg.customInterceptors().addInterceptor().interceptor(new DummyInterceptor()).position(Position.FIRST);
      withCacheManager(new CacheManagerCallable(TestCacheManagerFactory.createCacheManager()) {
         @Override
         public void call() {
            cm.defineConfiguration("custom", cfg.build());
View Full Code Here

   @Override
   protected void createCacheManagers() throws Throwable {
      cacheMode = CacheMode.REPL_SYNC;
      ConfigurationBuilder config = getDefaultClusteredCacheConfig(cacheMode, true);
      numOwners = 3;
      config
            .locking().lockAcquisitionTimeout(LOCK_TIMEOUT)
            .clustering().sync().replTimeout(REPL_TIMEOUT)
            .clustering().hash().numOwners(numOwners)
            .transaction().transactionManagerLookup(new DummyTransactionManagerLookup())
            .transaction().completedTxTimeout(3600000);
View Full Code Here

   @Override
   protected void createCacheManagers() throws Throwable {
      ConfigurationBuilder dcc = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, true);
      dcc.clustering().hash().numOwners(1).l1().disable();
      dcc.locking().transaction().transactionMode(TransactionMode.TRANSACTIONAL);
      createCluster(dcc, 4);
      waitForClusterToForm();
   }

   public void testPutOnNonOwner() {  //todo [anistor] this does not test putAll !
View Full Code Here

public class InDoubtXidReturnedOnceTest extends MultipleCacheManagersTest {

   @Override
   protected void createCacheManagers() throws Throwable {
      ConfigurationBuilder configuration = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, true);
      configuration
         .locking()
            .useLockStriping(false)
         .transaction()
            .transactionManagerLookup(new RecoveryDummyTransactionManagerLookup())
            .useSynchronization(false)
View Full Code Here

   private static Log log = LogFactory.getLog(PostCommitRecoveryStateTest.class);

   @Override
   protected void createCacheManagers() throws Throwable {
      ConfigurationBuilder configuration = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, true);
      configuration
         .locking().useLockStriping(false)
         .transaction()
            .transactionManagerLookup(new RecoveryDummyTransactionManagerLookup())
            .useSynchronization(false)
            .recovery().enable()
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.