Package org.jboss.cache

Examples of org.jboss.cache.UnitTestCacheFactory


    */
   public ChannelFactory createMuxChannelFactory(String muxConfig) throws Exception
   {
      synchronized (factories)
      {
         muxConfig = new UnitTestCacheFactory().mangleClusterConfiguration(muxConfig);
         JChannelFactory factory = new JChannelFactory();
         factory.setDomain("jbc.mux.test");
         factory.setExposeChannels(false);
         factory.setMultiplexerConfig(getClusterConfigElement(muxConfig));

View Full Code Here


   Cache cache;

   @BeforeMethod(alwaysRun = true)
   public void setUp() throws Exception
   {
      cache = new UnitTestCacheFactory().createCache();
   }  
View Full Code Here

      assert errorHandler.noErrors();
   }

   public void testConfigWarnings()
   {
      UnitTestCacheFactory ucf = new UnitTestCacheFactory();
      for (String aConfFile : getConfigFileNames())
      {
         System.out.println("Processing file: " + aConfFile);
         assert !appender.isFoundUnknownWarning();
         Cache cache = ucf.createCache(CONFIG_ROOT + "/" + aConfFile, false);
//         cache.stop();
         assert !appender.isFoundUnknownWarning();
      }
   }
View Full Code Here

      catch (SystemException e)
      {
         // do nothing
      }
     
      new UnitTestCacheFactory().cleanUp();
     
   }
View Full Code Here

      catch (SystemException e)
      {
         // do nothing
      }
     
      new UnitTestCacheFactory().cleanUp();
     
   }
View Full Code Here

    */
   public ChannelFactory createMuxChannelFactory(String muxConfig) throws Exception
   {
      synchronized (factories)
      {
         muxConfig = new UnitTestCacheFactory().mangleClusterConfiguration(muxConfig);
         JChannelFactory factory = new JChannelFactory();
         factory.setDomain("jbc.mux.test");
         factory.setExposeChannels(false);
         factory.setMultiplexerConfig(getClusterConfigElement(muxConfig));

View Full Code Here

      CacheLoaderConfig cacheLoaderConfig = UnitTestConfigurationFactory.buildSingleCacheLoaderConfig(false, "", DummyInMemoryCacheLoader.class.getName(), "", false, true, false, false, false);
      // assign the cache loader explicitly so it will stick between restarts
      cacheLoaderConfig.getFirstCacheLoaderConfig().setCacheLoader(new DummyInMemoryCacheLoader());
      Configuration cfg = new Configuration();
      cfg.setCacheLoaderConfig(cacheLoaderConfig);
      cache = new UnitTestCacheFactory().createCache(cfg, getClass());
      cache.put(fqn, key, "value");

      // flush the cache and start with totally clean state
      cache.stop();
      cache.start();
View Full Code Here

   public void testChannelInjectionPreference() throws Exception
   {
      muxHelper.configureCacheForMux(cache);

      Channel channel = new JChannel(new UnitTestCacheFactory().mangleClusterConfigurationUdp(
              getClusterConfigFromProperties(JChannel.DEFAULT_PROTOCOL_STACK)));

      RuntimeConfig rtcfg = cache.getConfiguration().getRuntimeConfig();
      rtcfg.setChannel(channel);
View Full Code Here

   private void buildCache(List<CustomInterceptorConfig> interceptorConfig)
   {
      Configuration config = new Configuration();
      config.setCacheMode(Configuration.CacheMode.LOCAL);
      config.setNodeLockingScheme(Configuration.NodeLockingScheme.MVCC);
      UnitTestCacheFactory cacheFactory2 = new UnitTestCacheFactory<Object, Object>();
      CacheSPI tmpCacheSPI = (CacheSPI) cacheFactory2.createCache(config, getClass());
      defaultInterceptroCount = tmpCacheSPI.getInterceptorChain().size();
      tmpCacheSPI.stop();

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

   protected CacheSPI createCache()
   {
      Configuration config = new Configuration();
      config.setTransactionManagerLookupClass(GenericTransactionManagerLookup.class.getName());
      config.setCacheMode(CacheMode.REPL_ASYNC);
      cache = (CacheSPI) new UnitTestCacheFactory().createCache(config, true, getClass());
      tm = cache.getTransactionManager();
      return cache;
   }
View Full Code Here

TOP

Related Classes of org.jboss.cache.UnitTestCacheFactory

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.