Package org.jboss.cache

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


   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


   {
      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

    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

    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

    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

   {
      this.attributeStore = attributeStore;

      CacheFactory factory = new DefaultCacheFactory();

      this.cache = factory.createCache(cacheConfigInputStream);

      this.cache.start();

   }
View Full Code Here

   public IdentityStoreCacheProviderImpl(InputStream cacheConfigInputStream)
   {
      CacheFactory factory = new DefaultCacheFactory();

      this.cache = factory.createCache(cacheConfigInputStream);

      this.cache.start();

   }
View Full Code Here

   }

   protected Cache<String, String> newCache()
   {
      CacheFactory<String, String> f = new DefaultCacheFactory();
      Cache<String, String> cache = f.createCache(false);
      cache.getConfiguration().setCacheMode(Configuration.CacheMode.REPL_SYNC);
      optimisticConfiguration(cache.getConfiguration());
      cache.start();
      return cache;
   }
View Full Code Here

   public void setUp() throws Exception
   {
      if (cache != null)
         tearDown();
      CacheFactory<String, String> instance = new DefaultCacheFactory();
      cache = (CacheSPI) instance.createCache(false);
      // very short acquisition timeout
      cache.getConfiguration().setLockAcquisitionTimeout(100);
      cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
      cache.getConfiguration().setCacheMode(Configuration.CacheMode.LOCAL);
      cache.start();
View Full Code Here

   @BeforeMethod(alwaysRun = true)
   public void setUp()
   {
      CacheFactory<String, String> instance = new DefaultCacheFactory();
      cache = instance.createCache();
      listener = new Listener();
      cache.addCacheListener(listener);
   }

   @AfterMethod(alwaysRun = true)
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.