Package org.jboss.cache.config.Configuration

Examples of org.jboss.cache.config.Configuration.CacheMode


   @Override
   public void setCache(CacheSPI cache)
   {
      super.setCache(cache);
      CacheMode mode = cache.getConfiguration().getCacheMode();
      defaultSynchronous = (mode == CacheMode.REPL_SYNC || mode == CacheMode.INVALIDATION_SYNC);
   }
View Full Code Here


   @Inject
   protected void injectDependencies(TransactionTable txTable, CacheLoaderManager clm, Configuration configuration)
   {
      this.txTable = txTable;
      this.clm = clm;
      CacheMode mode = configuration.getCacheMode();
      usingOptimisticInvalidation = configuration.isNodeLockingOptimistic() && mode.isInvalidation();
   }
View Full Code Here

      if (caches.get(cacheID) != null)
      {
         throw new IllegalStateException(cacheID + " already created");
      }

      CacheMode mode = sync ? CacheMode.REPL_SYNC : CacheMode.REPL_ASYNC;
      Configuration c = UnitTestCacheConfigurationFactory.createConfiguration(mode);
      if (sync)
      {
         c.setSyncRollbackPhase(true);
         c.setSyncCommitPhase(true);
View Full Code Here

         TestingUtil.sleepThread(10);
      }

      // sleep a bit more to ensure the cache2 thread completes
      TestingUtil.sleepThread(5);
      CacheMode mode = cache2.getConfiguration().getCacheMode();
      boolean expectNull = (removeTest || mode == CacheMode.INVALIDATION_ASYNC || mode == CacheMode.INVALIDATION_SYNC);
      assertEquals("Cache2 correct", expectNull ? null : VALUE2, cache2.get(FQNA, KEY));
   }
View Full Code Here

      assertEquals("Cache1 correct", removeTest ? null : VALUE2, cache1.get(FQNA, KEY));

      // sleep a bit more to ensure the cache2 thread completes
      TestingUtil.sleepThread(500);

      CacheMode mode = cache2.getConfiguration().getCacheMode();
      boolean expectNull = (removeTest || mode == CacheMode.INVALIDATION_ASYNC || mode == CacheMode.INVALIDATION_SYNC);
      assertEquals("Cache2 correct", expectNull ? null : VALUE2, cache2.get(FQNA, KEY));
   }
View Full Code Here

       this.cache = cache;
       this.regionName = regionName;
       this.regionFqn = Fqn.fromString(SecondLevelCacheUtil.createRegionFqn(regionName, regionPrefix));
       this.transactionManager = transactionManager;
       this.forTimestamps = regionName.contains(UpdateTimestampsCache.class.getName());
       CacheMode mode = cache.getConfiguration().getCacheMode();
       if (forTimestamps)
       {         
          if (mode == CacheMode.INVALIDATION_ASYNC || mode == CacheMode.INVALIDATION_SYNC)
          {
             throw new IllegalStateException("Cache is configured for " + mode +
View Full Code Here

   }

   @Inject
   private void init()
   {
      CacheMode mode = configuration.getCacheMode();
      useTombstones = (mode == CacheMode.INVALIDATION_ASYNC) || (mode == CacheMode.INVALIDATION_SYNC);
   }
View Full Code Here

   protected void injectDependencies(TransactionTable txTable, CacheLoaderManager clm, Configuration configuration,
                                     DataContainer dataContainer, LockManager lockManager, Notifier notifier)
   {
      this.txTable = txTable;
      this.clm = clm;
      CacheMode mode = configuration.getCacheMode();
      usingOptimisticInvalidation = configuration.isNodeLockingOptimistic() && mode.isInvalidation();
      this.dataContainer = dataContainer;
      this.lockManager = lockManager;
      this.notifier = notifier;
   }
View Full Code Here

TOP

Related Classes of org.jboss.cache.config.Configuration.CacheMode

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.