Package org.infinispan.configuration.cache

Examples of org.infinispan.configuration.cache.TransactionConfiguration


        return new InfinispanImmutableSession(id, entry.getMetaData(), attributes, this.context);
    }

    @Override
    public FineSessionCacheEntry<L> findValue(String id) {
        TransactionConfiguration transaction = this.sessionCache.getCacheConfiguration().transaction();
        boolean pessimistic = transaction.transactionMode().isTransactional() && (transaction.lockingMode() == LockingMode.PESSIMISTIC);
        Cache<String, FineSessionCacheEntry<L>> cache = pessimistic ? this.sessionCache.getAdvancedCache().withFlags(Flag.FORCE_WRITE_LOCK) : this.sessionCache;
        return cache.get(id);
    }
View Full Code Here


        return new InfinispanBean<>(id, entry, group, mutator, this, this.timeout, this.listener);
    }

    @Override
    public BeanEntry<G> findValue(I id) {
        TransactionConfiguration transaction = this.cache.getCacheConfiguration().transaction();
        boolean pessimistic = transaction.transactionMode().isTransactional() && (transaction.lockingMode() == LockingMode.PESSIMISTIC);
        Cache<BeanKey<I>, BeanEntry<G>> cache = pessimistic ? this.cache.getAdvancedCache().withFlags(Flag.FORCE_WRITE_LOCK) : this.cache;
        return cache.get(this.createKey(id));
    }
View Full Code Here

        return new CoarseSessionEntry<>(entry, (existingValue != null) ? existingValue : value);
    }

    @Override
    public CoarseSessionEntry<L> findValue(String id) {
        TransactionConfiguration transaction = this.sessionCache.getCacheConfiguration().transaction();
        boolean pessimistic = transaction.transactionMode().isTransactional() && (transaction.lockingMode() == LockingMode.PESSIMISTIC);
        Cache<String, CoarseSessionCacheEntry<L>> cache = pessimistic ? this.sessionCache.getAdvancedCache().withFlags(Flag.FORCE_WRITE_LOCK) : this.sessionCache;
        CoarseSessionCacheEntry<L> entry = cache.get(id);
        if (entry == null) return null;
        MarshalledValue<Map<String, Object>, MarshallingContext> value = this.attributesCache.get(new SessionAttributesCacheKey(id));
        return new CoarseSessionEntry<>(entry, value);
View Full Code Here

      return cache.getCacheConfiguration().clustering().cacheMode().isClustered();
   }

   @Override
   protected boolean isCacheTransactional(Cache<?, ?> cache) {
      TransactionConfiguration txConfig = cache.getCacheConfiguration().transaction();
      return txConfig != null && txConfig.transactionMode() == TransactionMode.TRANSACTIONAL;
   }
View Full Code Here

      return config.invocationBatching().enabled();
   }

   @Override
   protected boolean isCacheAutoCommit(Cache<?, ?> cache) {
      TransactionConfiguration txConfig = cache.getCacheConfiguration().transaction();
      return txConfig != null && txConfig.autoCommit();
   }
View Full Code Here

      TransactionConfiguration txConfig = cache.getCacheConfiguration().transaction();
      return txConfig != null && txConfig.autoCommit();
   }

   protected boolean isCachePessimistic(Cache<?, ?> cache) {
      TransactionConfiguration txConfig = cache.getCacheConfiguration().transaction();
      return txConfig != null && txConfig.lockingMode().equals(LockingMode.PESSIMISTIC);
   }
View Full Code Here

TOP

Related Classes of org.infinispan.configuration.cache.TransactionConfiguration

Copyright © 2018 www.massapicom. 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.