Package org.infinispan.manager

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


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

         @Override
         public void addListener(Object listener)
         {
View Full Code Here


               ConfigurationBuilder builder = holder.newConfigurationBuilder(cacheName);
               builder.read(manager.getCacheConfiguration(cacheName));
            }

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

         manager.start();
         return manager;
View Full Code Here

   
    printCacheEntities(cache);
   
    cache.stop();
   
    cacheManager.stop();
  }
 
  private static void printCacheEntities(Cache<Object, Object> cache) {
    for(Entry<Object, Object> entry : cache.entrySet()){
      log(entry.getKey() + " -> " + entry.getValue());
View Full Code Here

                int index = random.nextInt(size);
                EmbeddedCacheManager cacheManager = cacheManagers.remove(index); //This is not thread safe, but should be ok for this test since the main thread is the only writrer to this list.


            log.info("Shutting down " + cacheManager.getAddress());
                cacheManager.stop();
            log.info("Shut down " + cacheManager.getAddress() + " complete");
            } catch (Exception e) {
            log.warn("Error during node removal", e);
            }
        }
View Full Code Here

      try {
         cm.getCache();
         ExternalizerTable extTable = TestingUtil.extractExtTable(cm);
         assertEquals(3456, extTable.getExternalizerId(new IdViaBothObj()));
      } finally {
         cm.stop();
      }
   }

   public void testForeignExternalizerMultiClassTypesViaSameExternalizer() {
      GlobalConfiguration globalCfg = GlobalConfiguration.getNonClusteredDefault();
View Full Code Here

         ExternalizerTable extTable = TestingUtil.extractExtTable(cm);
         assert 767 == extTable.getExternalizerId(new IdViaConfigObj());
         assert 767 == extTable.getExternalizerId(new IdViaAnnotationObj());
         assert 767 == extTable.getExternalizerId(new IdViaBothObj());
      } finally {
         cm.stop();
      }
   }

   public void testForeignExternalizerMultiClassNameTypesViaSameExternalizer() {
      GlobalConfiguration globalCfg = GlobalConfiguration.getNonClusteredDefault();
View Full Code Here

         ExternalizerTable extTable = TestingUtil.extractExtTable(cm);
         assert 868 == extTable.getExternalizerId(new IdViaConfigObj());
         assert 868 == extTable.getExternalizerId(new IdViaAnnotationObj());
         assert 868 == extTable.getExternalizerId(new IdViaBothObj());
      } finally {
         cm.stop();
      }
   }

   private GlobalConfiguration createForeignExternalizerGlobalConfig(int id) {
      GlobalConfiguration globalCfg = GlobalConfiguration.getNonClusteredDefault();
View Full Code Here

         extTable.start();
         assert false : message;
      } catch (ConfigurationException ce) {
         log.trace("Expected exception", ce);
      } finally {
         cm.stop();
      }
   }

   private void withExpectedFailure(GlobalConfiguration globalCfg, String message) {
      EmbeddedCacheManager cm = null;
View Full Code Here

   public void stopServers() throws Exception {
      if (!servers.isEmpty()) {
         for (Context s : servers.values()) {
            EmbeddedCacheManager manager = ServerBootstrap.getCacheManager(s.getServletContext());
            s.getServer().stop();
            manager.stop();
         }
      } else {
         throw new IllegalStateException("No servers defined!");
      }
   }
View Full Code Here

    user.setUsername("rtsang");
    user.setFirstName("Ray");
    user.setLastName("Tsang");
    userCache.put(user.getUsername(), user);
    userCache.stop();
    cacheManager.stop();
  }

  protected void validateConfig(Cache<VehicleId, Vehicle> vehicleCache) {
     StoreConfiguration config = vehicleCache.getCacheConfiguration().persistence().stores().get(0);
    
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.