Examples of HotRodServer


Examples of org.infinispan.server.hotrod.HotRodServer

      assertEquals("v", remoteCache.put("k","v"));
      assertOnlyServerHit(expectedServer);

      //this would be the next server to be shutdown
      expectedServer = strategy.getServers()[strategy.getNextPosition()];
      HotRodServer toStop = addr2hrServer.get(expectedServer);
      toStop.stop();
      for (Iterator<EmbeddedCacheManager> ecmIt = cacheManagers.iterator(); ecmIt.hasNext();) {
         if (ecmIt.next().getAddress().equals(expectedServer)) ecmIt.remove();
      }
      waitForClusterToForm();
   }
View Full Code Here

Examples of org.infinispan.server.hotrod.HotRodServer

      }
   }

   private HotRodServer addHotRodServer(ConfigurationBuilder builder) {
      EmbeddedCacheManager cm = addClusterEnabledCacheManager(builder);
      HotRodServer server = TestHelper.startHotRodServer(cm);
      servers.add(server);
      return server;
   }
View Full Code Here

Examples of org.infinispan.server.hotrod.HotRodServer

      final AtomicInteger clientTopologyId = (AtomicInteger) TestingUtil.extractField(remoteCacheManager, "topologyId");

      final int topologyIdBeforeJoin = clientTopologyId.get();
      log.tracef("Starting test with client topology id %d", topologyIdBeforeJoin);
      EmbeddedCacheManager cm5 = addClusterEnabledCacheManager(buildConfiguration());
      HotRodServer hotRodServer5 = TestHelper.startHotRodServer(cm5);

      // Rebalancing to include the joiner will increment the topology id by 2
      eventually(new Condition() {
         @Override
         public boolean isSatisfied() throws Exception {
View Full Code Here

Examples of org.infinispan.server.hotrod.HotRodServer

      }
   }

   private HotRodServer addHotRodServer(ConfigurationBuilder builder) {
      EmbeddedCacheManager cm = addClusterEnabledCacheManager(builder);
      HotRodServer server = TestHelper.startHotRodServer(cm);
      servers.add(server);
      return server;
   }
View Full Code Here

Examples of org.infinispan.server.hotrod.HotRodServer

    */
   private static final AtomicInteger uniquePort = new AtomicInteger(15232);

   public static HotRodServer startHotRodServer(EmbeddedCacheManager cacheManager) {
      // TODO: This is very rudimentary!! HotRodTestingUtil needs a more robust solution where ports are generated randomly and retries if already bound
      HotRodServer server = null;
      int maxTries = 10;
      int currentTries = 0;
      ChannelException lastException = null;
      while (server == null && currentTries < maxTries) {
         try {
View Full Code Here

Examples of org.infinispan.server.hotrod.HotRodServer

      withCacheManager(new CacheManagerCallable(
            TestCacheManagerFactory.createCacheManager(
                  hotRodCacheConfiguration())) {
         @Override
         public void call() {
            HotRodServer hotrodServer = TestHelper.startHotRodServer(cm);
            try {
               withRemoteCacheManager(new RemoteCacheManagerCallable(
                     new RemoteCacheManager("localhost", hotrodServer.getPort())) {
                  @Override
                  public void call() {
                     RemoteCache remoteCache = rcm.getCache();
                     remoteCache.put("k","v");
                     assertEquals("v", remoteCache.get("k"));
View Full Code Here

Examples of org.infinispan.server.hotrod.HotRodServer

      withCacheManager(new CacheManagerCallable(
            TestCacheManagerFactory.createCacheManager(
                  hotRodCacheConfiguration())) {
         @Override
         public void call() {
            HotRodServer hotrodServer = TestHelper.startHotRodServer(cm);
            try {
               withRemoteCacheManager(new RemoteCacheManagerCallable(
                     new RemoteCacheManager("localhost", hotrodServer.getPort())) {
                  @Override
                  public void call() {
                     RemoteCache remoteCache = rcm.getCache();
                     remoteCache.put("k","v");
                     assertEquals("v", remoteCache.get("k"));
View Full Code Here

Examples of org.infinispan.server.hotrod.HotRodServer

    */
   private static final AtomicInteger uniquePort = new AtomicInteger(15232);

   public static HotRodServer startHotRodServer(EmbeddedCacheManager cacheManager) {
      // TODO: This is very rudimentary!! HotRodTestingUtil needs a more robust solution where ports are generated randomly and retries if already bound
      HotRodServer server = null;
      int maxTries = 10;
      int currentTries = 0;
      ChannelException lastException = null;
      while (server == null && currentTries < maxTries) {
         try {
View Full Code Here

Examples of org.infinispan.server.hotrod.HotRodServer

      return cacheManager;
   }

   private void initServerAndClient(boolean sslServer, boolean sslClient) {
      hotrodServer = new HotRodServer();
      HotRodServerConfigurationBuilder serverBuilder = new HotRodServerConfigurationBuilder();

      ClassLoader tccl = Thread.currentThread().getContextClassLoader();
      String keyStoreFileName = tccl.getResource("keystore.jks").getPath();
      String trustStoreFileName = tccl.getResource("truststore.jks").getPath();
View Full Code Here

Examples of org.infinispan.server.hotrod.HotRodServer

      }
   }

   private HotRodServer addHotRodServer(ConfigurationBuilder builder) {
      EmbeddedCacheManager cm = addClusterEnabledCacheManager(builder);
      HotRodServer server = TestHelper.startHotRodServer(cm);
      servers.add(server);
      return server;
   }
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.