Package org.infinispan.manager

Examples of org.infinispan.manager.DefaultCacheManager.start()


      EmbeddedCacheManager cacheManager = new DefaultCacheManager(globalConfig);

      cacheManager.defineConfiguration("testCache", cacheConfig);

      cacheManager.start();
      Cache<String, String> cache = cacheManager.getCache("testCache");

      cache.put("hello", "there");
      cache.stop();
      cacheManager.stop();
View Full Code Here


      EmbeddedCacheManager cacheManager = new DefaultCacheManager(globalConfig);

      cacheManager.defineConfiguration("userCache", cacheConfig);

      cacheManager.start();
      Cache<String, User> userCache = cacheManager.getCache("userCache");
      User user = new User();
      user.setUsername("rtsang");
      user.setFirstName("Ray");
      user.setLastName("Tsang");
View Full Code Here

   @BeforeMethod
   public void beforeTest() throws IOException {
      for (int i = 0; i < NUM_NODES; i++) {
         DefaultCacheManager node = new DefaultCacheManager(CONFIGURATION);
         node.start();
         //Start all its caches:
         node.getCache("index_metadata").start();
         node.getCache("index_data").start();
         node.getCache("index_locks").start();
         cacheManagers.put(i, node);
View Full Code Here

        if ( transactionManagerLookupDelegator.isValid() ) {
          cfg.setTransactionManagerLookup( transactionManagerLookupDelegator );
        }
        cacheManager.defineConfiguration( entry.getKey(), cfg );
      }
      cacheManager.start();
      return cacheManager;
    } catch (RuntimeException re) {
      raiseConfigurationError(re, cfgName);
    }
    catch (IOException e) {
View Full Code Here

    EmbeddedCacheManager cacheManager = new DefaultCacheManager(
        globalConfig);

    cacheManager.defineConfiguration("userCache", cacheConfig);

    cacheManager.start();
    Cache<String, User> userCache = cacheManager.getCache("userCache");
    User user = new User();
    user.setUsername("rtsang");
    user.setFirstName("Ray");
    user.setLastName("Tsang");
View Full Code Here

    EmbeddedCacheManager cacheManager = new DefaultCacheManager(
        globalConfig);

    cacheManager.defineConfiguration("userCache", cacheConfig);

    cacheManager.start();
    Cache<String, User> userCache = cacheManager.getCache("userCache");
    User user = new User();
    user.setUsername("rayt");
    user.setFirstName("Ray");
    user.setLastName("Tsang");
View Full Code Here

      EmbeddedCacheManager cacheManager = new DefaultCacheManager(globalConfig);

      cacheManager.defineConfiguration("testCache", cacheConfig);

      cacheManager.start();
      Cache<String, String> cache = cacheManager.getCache("testCache");

      cache.put("hello", "there");
      cache.stop();
      cacheManager.stop();
View Full Code Here

      EmbeddedCacheManager cacheManager = new DefaultCacheManager(globalConfig);

      cacheManager.defineConfiguration("testCache", cacheConfig);

      cacheManager.start();
      Cache<String, String> cache = cacheManager.getCache("testCache");

      cache.put("hello", "there legacy java");
      cache.stop();
      cacheManager.stop();
View Full Code Here

      actions = new DemoActions(infinispanDirectory, cache);
   }

   public static void main(String[] args) throws IOException {
      DefaultCacheManager cacheManager = new DefaultCacheManager("config-samples/lucene-demo-cache-config.xml");
      cacheManager.start();
      try {
         Cache<?, ?> cache = cacheManager.getCache();
         Directory directory = DirectoryBuilder
                  .newDirectoryInstance(cache, cache, cache, "index-name")
                  .create();
View Full Code Here

         EmbeddedCacheManager manager = new DefaultCacheManager(configLoc, false);
         String globalStats = PropertiesHelper.extractPropertyValue(INFINISPAN_GLOBAL_STATISTICS_PROP, properties);
         if (globalStats != null) {
            manager.getGlobalConfiguration().setExposeGlobalJmxStatistics(Boolean.parseBoolean(globalStats));
         }
         manager.start();
         return manager;
      } catch (IOException e) {
         throw new CacheException("Unable to create default cache manager", 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.