Package org.jboss.cache.config.Configuration

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


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

      CacheMode mode = sync ? CacheMode.REPL_SYNC : CacheMode.REPL_ASYNC;
      Configuration c = UnitTestConfigurationFactory.createConfiguration(mode);

      if (sync)
      {
         c.setSyncRollbackPhase(true);
View Full Code Here


   private void internalSetClusteredCache(Cache<Serializable, Serializable> cache)
   {
      this.cache = cache;
      if (this.cache != null)
      {       
        CacheMode cm = cache.getConfiguration().getCacheMode();
        if (CacheMode.REPL_ASYNC == cm)
        {
           this.replAsync = true;
        }
        else if (CacheMode.REPL_SYNC == cm)
View Full Code Here

   public void setClusteredCache(Cache<Serializable, Serializable> cache)
   {
      this.cache = cache;
      if (this.cache != null)
      {       
        CacheMode cm = cache.getConfiguration().getCacheMode();
        if (CacheMode.REPL_ASYNC == cm)
        {
           this.replAsync = true;
        }
        else if (CacheMode.REPL_SYNC == cm)
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);

      CacheSPI<?, ?> cache = (CacheSPI<?, ?>) new UnitTestCacheFactory<Object, Object>().createCache(c, false);

      //cache.getConfiguration().setClusterName("TestCluster");
View Full Code Here

   }

   @Inject
   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();
      usingVersionedInvalidation = configuration.getNodeLockingScheme().isVersionedScheme() && mode.isInvalidation();
      this.dataContainer = dataContainer;
      this.lockManager = lockManager;
      this.notifier = notifier;
   }
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);
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 state incorrect!", expectNull ? null : VALUE2, cache2.get(FQNA, KEY));
   }
View Full Code Here

      assertEquals("Cache1 state incorrect", 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 state incorrect", expectNull ? null : VALUE2, cache2.get(FQNA, KEY));
   }
View Full Code Here

                                     DataContainer dataContainer, LockManager lockManager, Notifier notifier,
                                     BuddyFqnTransformer buddyFqnTransformer)
   {
      this.txTable = txTable;
      this.clm = clm;
      CacheMode mode = configuration.getCacheMode();
      usingVersionedInvalidation = configuration.getNodeLockingScheme().isVersionedScheme() && mode.isInvalidation();
      this.dataContainer = dataContainer;
      this.lockManager = lockManager;
      this.notifier = notifier;
      this.buddyFqnTransformer = buddyFqnTransformer;
   }
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.