Examples of locking()


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

               .writeSkewCheck(true)
            .transaction()
               .lockingMode(LockingMode.OPTIMISTIC);

      EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(builder);
      builder.locking().writeSkewCheck(false).versioning().disable();
      cm.defineConfiguration("no-ws-chk", builder.build());
      return cm;
   }

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

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

      assert adapt.isEnableVersioning();
   }

   public void testNoneIsolationLevel() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.locking().isolationLevel(IsolationLevel.NONE);
      withCacheManager(new CacheManagerCallable(
            createCacheManager(builder)) {
         @Override
         public void call() {
            Configuration cfg = cm.getCache().getCacheConfiguration();
View Full Code Here

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

      });
   }

   public void testNoneIsolationLevelInCluster() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.locking().isolationLevel(IsolationLevel.NONE)
            .clustering().cacheMode(CacheMode.REPL_SYNC).build();
      withCacheManager(new CacheManagerCallable(
            TestCacheManagerFactory.createClusteredCacheManager(builder)) {
         @Override
         public void call() {
View Full Code Here

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

         ParseUtils.requireNoNamespaceAttribute(reader, i);
         String value = replaceProperties(reader.getAttributeValue(i));
         Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
         switch (attribute) {
            case CONCURRENCY_LEVEL:
               builder.locking().concurrencyLevel(Integer.parseInt(value));
               break;
            case ISOLATION_LEVEL:
               builder.locking().isolationLevel(IsolationLevel.valueOf(value));
               break;
            case LOCK_ACQUISITION_TIMEOUT:
View Full Code Here

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

         switch (attribute) {
            case CONCURRENCY_LEVEL:
               builder.locking().concurrencyLevel(Integer.parseInt(value));
               break;
            case ISOLATION_LEVEL:
               builder.locking().isolationLevel(IsolationLevel.valueOf(value));
               break;
            case LOCK_ACQUISITION_TIMEOUT:
               builder.locking().lockAcquisitionTimeout(Long.parseLong(value));
               break;
            case USE_LOCK_STRIPING:
View Full Code Here

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

               break;
            case ISOLATION_LEVEL:
               builder.locking().isolationLevel(IsolationLevel.valueOf(value));
               break;
            case LOCK_ACQUISITION_TIMEOUT:
               builder.locking().lockAcquisitionTimeout(Long.parseLong(value));
               break;
            case USE_LOCK_STRIPING:
               builder.locking().useLockStriping(Boolean.parseBoolean(value));
               break;
            case WRITE_SKEW_CHECK:
View Full Code Here

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

               break;
            case LOCK_ACQUISITION_TIMEOUT:
               builder.locking().lockAcquisitionTimeout(Long.parseLong(value));
               break;
            case USE_LOCK_STRIPING:
               builder.locking().useLockStriping(Boolean.parseBoolean(value));
               break;
            case WRITE_SKEW_CHECK:
               builder.locking().writeSkewCheck(Boolean.parseBoolean(value));
               break;
            case SUPPORTS_CONCURRENT_UPDATES:
View Full Code Here

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

               break;
            case USE_LOCK_STRIPING:
               builder.locking().useLockStriping(Boolean.parseBoolean(value));
               break;
            case WRITE_SKEW_CHECK:
               builder.locking().writeSkewCheck(Boolean.parseBoolean(value));
               break;
            case SUPPORTS_CONCURRENT_UPDATES:
               builder.locking().supportsConcurrentUpdates(Boolean.parseBoolean(value));
               break;
            default:
View Full Code Here

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

               break;
            case WRITE_SKEW_CHECK:
               builder.locking().writeSkewCheck(Boolean.parseBoolean(value));
               break;
            case SUPPORTS_CONCURRENT_UPDATES:
               builder.locking().supportsConcurrentUpdates(Boolean.parseBoolean(value));
               break;
            default:
               throw ParseUtils.unexpectedAttribute(reader, i);
         }
      }
View Full Code Here

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

      });
   }

   public void testNoLockingInterceptorWithoutConcurrentAccess() {
      ConfigurationBuilder builder = new ConfigurationBuilder();
      builder.locking().supportsConcurrentUpdates(false);
      withCacheManager(new CacheManagerCallable(
            TestCacheManagerFactory.createCacheManager(builder)) {
         @Override
         public void call() {
            AbstractLockingInterceptor locking = TestingUtil.findInterceptor(
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.