Package org.jboss.cache

Examples of org.jboss.cache.Cache


   }

   @Test (expectedExceptions = NullPointerException.class)
   public void testConstructorWithNullSearchFactory()
   {
      Cache cache = new DefaultCacheFactory().createCache();
      SearchableCacheImpl nullSearchFactory = new SearchableCacheImpl(cache, null);
   }
View Full Code Here


   String key3 = "MiniGoat";

   @BeforeMethod
   public void setUp()
   {
      Cache coreCache = new DefaultCacheFactory().createCache();
      searchableCache = new SearchableCacheFactory().createSearchableCache(coreCache, Person.class);

      person1 = new Person();
      person1.setName("Navin Surtani");
      person1.setBlurb("Likes playing WoW");
View Full Code Here

   String key3 = "MiniGoat";

   @BeforeTest
   public void setUp()
   {
      Cache coreCache = new DefaultCacheFactory().createCache();
      searchableCache = new SearchableCacheFactory().createSearchableCache(coreCache, Person.class);

      person1 = new Person();
      person1.setName("Navin Surtani");
      person1.setBlurb("Likes playing WoW");
View Full Code Here

   public void testProvided()
   {
      BrokenProvided provided = new BrokenProvided();
      provided.setBoth("Cat", 5);

      Cache cache = new DefaultCacheFactory().createCache();

      SearchableCache searchable = new SearchableCacheFactory().createSearchableCache(cache, BrokenProvided.class);


   }
View Full Code Here

   public void testDocumentId()
   {
      BrokenDocumentId provided = new BrokenDocumentId();
      provided.setBoth("Cat", 5);

      Cache cache = new DefaultCacheFactory().createCache();

      SearchableCache searchable = new SearchableCacheFactory().createSearchableCache(cache, BrokenProvided.class);


View Full Code Here

   public Transactional createTransactional() {
      return new JBossCacheTransactional();
   }

   public Cache getCache(String cacheName) {
      Cache cache = caches.get(cacheName);
      if (cache == null) {
         cache = createCache();
         caches.put(cacheName, cache);
      }
      return cache;
View Full Code Here

      }
      return cache;
   }

   protected Cache createCache() {
      Cache cache;
      log.info("Creating cache with the following configuration: " + config);
      cache = new DefaultCacheFactory().createCache(config);
      log.info("Running cache with following config: " + cache.getConfiguration());
      return cache;
   }
View Full Code Here

      return caches.isEmpty();
   }

   @Override
   public boolean isCoordinator() {
      Cache defaultCache = getCache(null);
      List<Address> members = defaultCache.getMembers();
      return members != null && !members.isEmpty() && members.get(0).equals(defaultCache.getLocalAddress());
   }
View Full Code Here

import static org.jboss.cache.lock.IsolationLevel.REPEATABLE_READ;

@Test (enabled = false)
public class TestConfigFiles {
   public void testConfigFilesRR() {
      Cache cache = new DefaultCacheFactory().createCache("mvcc/mvcc-local-RR.xml");
      cache.start();

      assert cache.getCacheStatus() == STARTED;

      assert cache.getConfiguration().getIsolationLevel() == REPEATABLE_READ;
      assert cache.getConfiguration().getCacheMode() == LOCAL;

      cache.stop();
   }
View Full Code Here

      cache.stop();
   }

   public void testConfigFilesRC() {
      Cache cache = new DefaultCacheFactory().createCache("mvcc/mvcc-local-RC.xml");
      cache.start();

      assert cache.getCacheStatus() == STARTED;

      assert cache.getConfiguration().getIsolationLevel() == READ_COMMITTED;
      assert cache.getConfiguration().getCacheMode() == LOCAL;

      cache.stop();
   }
View Full Code Here

TOP

Related Classes of org.jboss.cache.Cache

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.