Examples of DefaultCacheFactory


Examples of org.jboss.cache.DefaultCacheFactory

public class JmxManualTest
{
   public void testLocal() throws IOException
   {
      Configuration c = new Configuration();
      Cache cache = new DefaultCacheFactory().createCache(c);
      cache.put("/a/b/c", "a", "b");
      cache.put("/a/b/c", "c", "d");
      cache.put("/a/b/d", "a", "b");
      cache.put("/a/b/e", "c", "d");
View Full Code Here

Examples of org.jboss.cache.DefaultCacheFactory

   public void testLocalNoJMX() throws IOException
   {
      Configuration c = new Configuration();
      c.setExposeManagementStatistics(false);
      Cache cache = new DefaultCacheFactory().createCache(c);
      cache.put("/a/b/c", "a", "b");
      cache.put("/a/b/c", "c", "d");
      cache.put("/a/b/d", "a", "b");
      cache.put("/a/b/e", "c", "d");
View Full Code Here

Examples of org.jboss.cache.DefaultCacheFactory

      EvictionRegionConfig erc = new EvictionRegionConfig();
      erc.setEvictionAlgorithmConfig(new FIFOAlgorithmConfig(2));
      erc.setRegionFqn(Fqn.ROOT);
      ec.setDefaultEvictionRegionConfig(erc);
      c.setEvictionConfig(ec);
      Cache cache = new DefaultCacheFactory().createCache(c);
      cache.put("/a/b/c", "a", "b");
      cache.put("/a/b/c", "c", "d");
      cache.put("/a/b/d", "a", "b");
      cache.put("/a/b/e", "c", "d");
View Full Code Here

Examples of org.jboss.cache.DefaultCacheFactory

      System.in.read();
   }

   public void testLocalWithEvictionXML() throws IOException
   {
      Cache cache = new DefaultCacheFactory().createCache("config-samples/eviction-enabled.xml");
      cache.put("/a/b/c", "a", "b");
      cache.put("/a/b/c", "c", "d");
      cache.put("/a/b/d", "a", "b");
      cache.put("/a/b/e", "c", "d");
View Full Code Here

Examples of org.jboss.cache.DefaultCacheFactory

   @Test(enabled = false)
   public static void main(String[] args)
   {
      Configuration localConfig = UnitTestConfigurationFactory.createConfiguration(Configuration.CacheMode.REPL_SYNC);
      localConfig.setExposeManagementStatistics(true);
      CacheFactory cacheFactory = new DefaultCacheFactory();
      Cache cache = cacheFactory.createCache(localConfig);
      JmxRegistrationManager regManager = new JmxRegistrationManager(cache);
      while (true){}
   }
View Full Code Here

Examples of org.jboss.cache.DefaultCacheFactory

      assert errorHandler.noErrors();
   }

   public void testConfigWarnings()
   {
      DefaultCacheFactory ucf = new DefaultCacheFactory();
      for (String aConfFile : getConfigFileNames())
      {
         assert !appender.isFoundUnknownWarning();
         Cache cache = ucf.createCache(CONFIG_ROOT + "/" + aConfFile, true);
         cache.stop();
         cache.destroy();
         assert !appender.isFoundUnknownWarning();
      }
   }
View Full Code Here

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


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

      person1 = new Person();
      person2 = new Person();
      person3 = new Person();
View Full Code Here

Examples of org.jboss.cache.DefaultCacheFactory

   }

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

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