Examples of DefaultCacheFactory


Examples of org.jboss.cache.DefaultCacheFactory

    @Create
    public void create() {
        log.debug("Starting JBoss Cache");

        try {
            CacheFactory factory = new DefaultCacheFactory();
            cache = factory.createCache(getConfigurationAsStream());

            cache.create();
            cache.start();
        } catch (Exception e) {
            //log.error(e, e);
View Full Code Here

Examples of org.jboss.cache.DefaultCacheFactory

   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

Examples of org.jboss.cache.DefaultCacheFactory

   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

Examples of org.jboss.cache.DefaultCacheFactory

   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

Examples of org.jboss.cache.DefaultCacheFactory

   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

Examples of org.jboss.cache.DefaultCacheFactory

   public void setUp() throws CloneNotSupportedException
   {
      Configuration cacheCfg = new Configuration();
      cacheCfg.setCacheMode(Configuration.CacheMode.REPL_SYNC);
      cacheCfg.setFetchInMemoryState(false);
      cache1 = new DefaultCacheFactory().createCache(cacheCfg.clone());
      searchableCache1 = new SearchableCacheFactory().createSearchableCache(cache1, Person.class);

      cache2 = new DefaultCacheFactory().createCache(cacheCfg.clone());
      searchableCache2 = new SearchableCacheFactory().createSearchableCache(cache2, Person.class);

      // wait until both caches are started and can see each other on the network.
      long giveUpTime = System.currentTimeMillis() + (60 * 1000); // give up after 1 minute of waiting
      boolean wait = true;
View Full Code Here

Examples of org.jboss.cache.DefaultCacheFactory

   }

   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

Examples of org.jboss.cache.DefaultCacheFactory

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;
View Full Code Here

Examples of org.jboss.cache.DefaultCacheFactory

      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;
View Full Code Here

Examples of org.jboss.cache.DefaultCacheFactory

   public JBossCacheAttributeStoreWrapper(AttributeStore attributeStore, InputStream cacheConfigInputStream)
   {
      this.attributeStore = attributeStore;

      CacheFactory factory = new DefaultCacheFactory();

      this.cache = factory.createCache(cacheConfigInputStream);

      this.cache.start();

   }
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.