Examples of createCache()


Examples of org.jboss.cache.CacheFactory.createCache()

   {
      Configuration config = new Configuration();
      config.setCacheMode(Configuration.CacheMode.LOCAL);
      config.setNodeLockingScheme(Configuration.NodeLockingScheme.MVCC);
      CacheFactory cacheFactory2 = new UnitTestCacheFactory<Object, Object>();
      CacheSPI tmpCacheSPI = (CacheSPI) cacheFactory2.createCache(config);
      defaultInterceptroCount = tmpCacheSPI.getInterceptorChain().size();
      tmpCacheSPI.stop();

      CacheFactory cacheFactory = new UnitTestCacheFactory<Object, Object>();
      config.setCustomInterceptors(interceptorConfig);
View Full Code Here

Examples of org.jboss.cache.CacheFactory.createCache()

      defaultInterceptroCount = tmpCacheSPI.getInterceptorChain().size();
      tmpCacheSPI.stop();

      CacheFactory cacheFactory = new UnitTestCacheFactory<Object, Object>();
      config.setCustomInterceptors(interceptorConfig);
      cache = (CacheSPI) cacheFactory.createCache(config, true);
   }
}
View Full Code Here

Examples of org.jboss.cache.CacheFactory.createCache()

   public static void main(String[] args)
   {
      Configuration localConfig = UnitTestCacheConfigurationFactory.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.CacheFactory.createCache()

      conf.setCacheMode(Configuration.CacheMode.REPL_SYNC);
      BuddyReplicationConfig brc = new BuddyReplicationConfig();
      brc.setEnabled(true);
      conf.setBuddyReplicationConfig(brc);
     
      c1 = cf.createCache(conf, false);
      c2 = cf.createCache(conf.clone(), false);
      c3 = cf.createCache(conf.clone(), false);

      c1.start();
      c2.start();
View Full Code Here

Examples of org.jboss.cache.CacheFactory.createCache()

      BuddyReplicationConfig brc = new BuddyReplicationConfig();
      brc.setEnabled(true);
      conf.setBuddyReplicationConfig(brc);
     
      c1 = cf.createCache(conf, false);
      c2 = cf.createCache(conf.clone(), false);
      c3 = cf.createCache(conf.clone(), false);

      c1.start();
      c2.start();
      c3.start();
View Full Code Here

Examples of org.jboss.cache.CacheFactory.createCache()

      brc.setEnabled(true);
      conf.setBuddyReplicationConfig(brc);
     
      c1 = cf.createCache(conf, false);
      c2 = cf.createCache(conf.clone(), false);
      c3 = cf.createCache(conf.clone(), false);

      c1.start();
      c2.start();
      c3.start();
View Full Code Here

Examples of org.jboss.cache.CacheFactory.createCache()

  private void batchTest() {
   
    Configuration config = new Configuration();
    config.setInvocationBatchingEnabled(true);
    CacheFactory factory = new DefaultCacheFactory();
    Cache cache = factory.createCache(config);
   
    cache.put("/a", "a", new Content("a"));
   
    cache.startBatch();
    cache.put("/b", "b", new Content("b"));
View Full Code Here

Examples of org.jboss.cache.CacheFactory.createCache()

    config.setIsolationLevel(IsolationLevel.READ_COMMITTED);
    config.setCacheMode(CacheMode.LOCAL);
    config.setLockAcquisitionTimeout(15000);
   
    CacheFactory factory = new DefaultCacheFactory();
    Cache cache = factory.createCache(config);
  }

  private void destroy() {

    Cache cache = createCacheUseDefault();
View Full Code Here

Examples of org.jboss.cache.CacheFactory.createCache()

  }

  private Cache createCacheUseFilepathXML() {

    CacheFactory factory = new DefaultCacheFactory();
    Cache cache = factory.createCache(
        "/opt/configurations/cache-configuration.xml", false);
    Configuration config = cache.getConfiguration();
    config.setClusterName("Cluster Test");
    cache.create();
    cache.start();
View Full Code Here

Examples of org.jboss.cache.CacheFactory.createCache()

  }

  private Cache createCacheUseClasspathXML() {

    CacheFactory factory = new DefaultCacheFactory();
    Cache cache = factory.createCache("cache-configuration.xml");

    return cache;
  }

  private Cache createCacheUseDefault() {
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.