Package org.infinispan.client.hotrod.impl.transport.tcp

Examples of org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory$FailoverToRequestBalancingStrategyDelegate


      hotrodClientConf.setProperty("numTestsPerEvictionRun", "10");
      hotrodClientConf.setProperty("infinispan.client.hotrod.ping_on_startup", "true");
      remoteCacheManager = new RemoteCacheManager(hotrodClientConf);
      remoteCache = remoteCacheManager.getCache();

      TcpTransportFactory tcpConnectionFactory = (TcpTransportFactory) TestingUtil.extractField(remoteCacheManager, "transportFactory");
      connectionPool = (GenericKeyedObjectPool<?, ?>) TestingUtil.extractField(tcpConnectionFactory, "connectionPool");

      return cacheManager;
   }
View Full Code Here


      ex.shutdownNow();
      kaf.stop();

      remoteCache.put(key, "v");
      assertOnlyServerHit(getAddress(hotRodServer2));
      TcpTransportFactory tcpTp = TestingUtil.extractField(remoteCacheManager, "transportFactory");

      Marshaller sm = new JBossMarshaller();
      TcpTransport transport = (TcpTransport) tcpTp.getTransport(sm.objectToByteBuffer(key, 64), null, RemoteCacheManager.cacheNameBytes());
      try {
      assertEquals(transport.getServerAddress(), new InetSocketAddress("localhost", hotRodServer2.getPort()));
      } finally {
         tcpTp.releaseTransport(transport);
      }


      log.info("About to stop Hot Rod server 2");
      hotRodServer2.stop();
View Full Code Here

      TestingUtil.sleepThread(2000);

      TestingUtil.killCacheManagers(cm);
      TestingUtil.waitForRehashToComplete(cache(0));

      TcpTransportFactory transportFactory = TestingUtil.extractField(client(0), "transportFactory");
      SocketAddress[] servers = ((RoundRobinBalancingStrategy) transportFactory.getBalancer(RemoteCacheManager.cacheNameBytes())).getServers();

      putHammer.stop = true;
      putHammerFuture.get();

      assertEquals(1, servers.length);
View Full Code Here

TOP

Related Classes of org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory$FailoverToRequestBalancingStrategyDelegate

Copyright © 2018 www.massapicom. 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.