Examples of lockingMode()


Examples of org.infinispan.configuration.cache.TransactionConfiguration.lockingMode()

    }

    @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);
    }

    @Override
View Full Code Here

Examples of org.infinispan.configuration.cache.TransactionConfiguration.lockingMode()

    }

    @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));
    }

    @Override
View Full Code Here

Examples of org.infinispan.configuration.cache.TransactionConfiguration.lockingMode()

    }

    @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

Examples of org.infinispan.configuration.cache.TransactionConfiguration.lockingMode()

      return txConfig != null && txConfig.autoCommit();
   }

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

   public int getNumOwners(Cache<?, ?> cache) {
      switch (cache.getCacheConfiguration().clustering().cacheMode()) {
         case LOCAL: return 1;
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.