Package org.infinispan.manager

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


         }

         @Override
         public void start()
         {
            jvmRouteContainer.start();
            sessionContainer.start();
         }

         @Override
         public void stop()
View Full Code Here


            // 5. Discard existing cache manager and create a brand new one
            manager.stop();
            manager = new DefaultCacheManager(holder, false);
         }

         manager.start();
         return manager;
      } catch (IOException e) {
         throw new CacheException("Unable to create default cache manager", e);
      }
   }
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

   public void startServers() throws Exception {
      if (!servers.isEmpty()) {
         for (Context s : servers.values()) {
            EmbeddedCacheManager manager = ServerBootstrap.getCacheManager(s.getServletContext());
            manager.start();
            for (String cacheName : manager.getCacheNames()) {
               manager.getCache(cacheName);
            }
            manager.getCache();
            s.getServer().start();
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 manager = new DefaultCacheManager(configLoc, false);
         String globalStats = ConfigurationHelper.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

            throw new CacheException(service.getStartException());
        }
        EmbeddedCacheManagerConfiguration config = service.getValue();
        GlobalConfiguration global = new GlobalConfigurationBuilder().read(config.getGlobalConfiguration()).classLoader(this.getClass().getClassLoader()).build();
        EmbeddedCacheManager manager = new DefaultEmbeddedCacheManager(global, config.getDefaultCache());
        manager.start();
        return manager;
    }

    @SuppressWarnings("rawtypes")
    @Override
View Full Code Here

            throw new CacheException(service.getStartException());
        }
        EmbeddedCacheManagerConfiguration config = service.getValue();
        GlobalConfiguration global = new GlobalConfigurationBuilder().read(config.getGlobalConfiguration()).classLoader(this.getClass().getClassLoader()).build();
        EmbeddedCacheManager manager = new DefaultEmbeddedCacheManager(global, config.getDefaultCache());
        manager.start();
        return manager;
    }

    static class NotifyingListener<T> extends AbstractServiceListener<T> {
        @Override
View Full Code Here

         .expiration().wakeUpInterval(5000L).maxIdle(120000L)
         .build();

      EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(
            GlobalConfiguration.getNonClusteredDefault(), config);
      cm.start();
      return cm.getCache();
   }

   @DataProvider(name = "readWriteRemove")
   public Object[][] independentReadWriteRemoveParams() {
View Full Code Here

         .expiration().wakeUpInterval(5000L).maxIdle(120000L)
         .build();

      EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(
            GlobalConfiguration.getNonClusteredDefault(), config);
      cm.start();
      return cm.getCache();
   }

   @DataProvider(name = "readWriteRemove")
   public Object[][] independentReadWriteRemoveParams() {
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.