Examples of HotRodServerConfigurationBuilder


Examples of org.infinispan.server.hotrod.configuration.HotRodServerConfigurationBuilder

   TestKeyValueFilterFactory filterFactory = new TestKeyValueFilterFactory();

   @Override
   protected HotRodServer createHotRodServer() {
      HotRodServerConfigurationBuilder builder = new HotRodServerConfigurationBuilder();
      HotRodServer server = TestHelper.startHotRodServer(cacheManager, builder);
      server.addKeyValueFilterFactory("test-filter-factory", filterFactory);
      return server;
   }
View Full Code Here

Examples of org.infinispan.server.hotrod.configuration.HotRodServerConfigurationBuilder

      return server;
   }

   public static HotRodServer startHotRodServer(EmbeddedCacheManager cacheManager) {
      return startHotRodServer(cacheManager, new HotRodServerConfigurationBuilder());
   }
View Full Code Here

Examples of org.infinispan.server.hotrod.configuration.HotRodServerConfigurationBuilder

      return cacheManager;
   }

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

      ClassLoader tccl = Thread.currentThread().getContextClassLoader();
      String keyStoreFileName = tccl.getResource("keystore.jks").getPath();
      String trustStoreFileName = tccl.getResource("truststore.jks").getPath();
      serverBuilder.ssl()
         .enabled(sslServer)
         .keyStoreFileName(keyStoreFileName)
         .keyStorePassword("secret".toCharArray())
         .trustStoreFileName(trustStoreFileName)
         .trustStorePassword("secret".toCharArray());
      hotrodServer.start(serverBuilder.build(), cacheManager);
      log.info("Started server on port: " + hotrodServer.getPort());

      ConfigurationBuilder clientBuilder = new ConfigurationBuilder();
      clientBuilder
         .addServer()
View Full Code Here

Examples of org.infinispan.server.hotrod.configuration.HotRodServerConfigurationBuilder

      assert defaultRemote.get("k").equals("v");

      int port = hotrodServer.getPort();
      hotrodServer.stop();

      HotRodServerConfigurationBuilder builder = new HotRodServerConfigurationBuilder();
      builder.host("127.0.0.1").port(port).workerThreads(2).idleTimeout(20000).tcpNoDelay(true).sendBufSize(15000).recvBufSize(25000);
      hotrodServer.start(builder.build(), cacheManager);

      Thread.sleep(3000);

      assert defaultRemote.get("k").equals("v");
      defaultRemote.put("k","v");
View Full Code Here

Examples of org.infinispan.server.hotrod.configuration.HotRodServerConfigurationBuilder

@Test(groups = "functional", testName = "client.hotrod.event.ClientCustomEventsTest")
public class ClientCustomEventsTest extends SingleHotRodServerTest {

   @Override
   protected HotRodServer createHotRodServer() {
      HotRodServerConfigurationBuilder builder = new HotRodServerConfigurationBuilder();
      HotRodServer server = TestHelper.startHotRodServer(cacheManager, builder);
      server.addConverterFactory("static-converter-factory", new StaticConverterFactory());
      server.addConverterFactory("dynamic-converter-factory", new DynamicConverterFactory());
      return server;
   }
View Full Code Here

Examples of org.infinispan.server.hotrod.configuration.HotRodServerConfigurationBuilder

      return hotRodCacheConfiguration(getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC, false));
   }

   protected HotRodServer addHotRodServer(ConfigurationBuilder builder) {
      EmbeddedCacheManager cm = addClusterEnabledCacheManager(builder);
      HotRodServerConfigurationBuilder serverBuilder = new HotRodServerConfigurationBuilder();
      HotRodServer server = TestHelper.startHotRodServer(cm, serverBuilder);
      server.addKeyValueFilterFactory("static-filter-factory", new StaticKeyValueFilterFactory());
      server.addConverterFactory("static-converter-factory", new StaticConverterFactory());
      servers.add(server);
      return server;
View Full Code Here

Examples of org.infinispan.server.hotrod.configuration.HotRodServerConfigurationBuilder

@Test(groups = "functional", testName = "client.hotrod.event.ClientFilterEventsTest")
public class ClientFilterEventsTest extends SingleHotRodServerTest {

   @Override
   protected HotRodServer createHotRodServer() {
      HotRodServerConfigurationBuilder builder = new HotRodServerConfigurationBuilder();
      HotRodServer server = TestHelper.startHotRodServer(cacheManager, builder);
      server.addKeyValueFilterFactory("static-filter-factory", new StaticKeyValueFilterFactory());
      server.addKeyValueFilterFactory("dynamic-filter-factory", new DynamicKeyValueFilterFactory());
      return server;
   }
View Full Code Here

Examples of org.infinispan.server.hotrod.configuration.HotRodServerConfigurationBuilder

@Test(groups = "functional", testName = "client.hotrod.event.ClientCustomEventsTest")
public class ClientCustomEventsTest extends SingleHotRodServerTest {

   @Override
   protected HotRodServer createHotRodServer() {
      HotRodServerConfigurationBuilder builder = new HotRodServerConfigurationBuilder();
      HotRodServer server = TestHelper.startHotRodServer(cacheManager, builder);
      server.addCacheEventConverterFactory("static-converter-factory", new StaticConverterFactory(), null);
      server.addCacheEventConverterFactory("dynamic-converter-factory", new DynamicConverterFactory(), null);
      return server;
   }
View Full Code Here

Examples of org.infinispan.server.hotrod.configuration.HotRodServerConfigurationBuilder

      return hotRodCacheConfiguration(getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC, false));
   }

   protected HotRodServer addHotRodServer(ConfigurationBuilder builder) {
      EmbeddedCacheManager cm = addClusterEnabledCacheManager(builder);
      HotRodServerConfigurationBuilder serverBuilder = new HotRodServerConfigurationBuilder();
      HotRodServer server = TestHelper.startHotRodServer(cm, serverBuilder);
      server.addCacheEventFilterFactory("static-filter-factory", new StaticCacheEventFilterFactory(), null);
      server.addCacheEventConverterFactory("static-converter-factory", new StaticConverterFactory(), null);
      servers.add(server);
      return server;
View Full Code Here

Examples of org.infinispan.server.hotrod.configuration.HotRodServerConfigurationBuilder

@Test(groups = "functional", testName = "client.hotrod.event.ClientFilterEventsTest")
public class ClientFilterEventsTest extends SingleHotRodServerTest {

   @Override
   protected HotRodServer createHotRodServer() {
      HotRodServerConfigurationBuilder builder = new HotRodServerConfigurationBuilder();
      HotRodServer server = TestHelper.startHotRodServer(cacheManager, builder);
      server.addCacheEventFilterFactory("static-filter-factory", new StaticCacheEventFilterFactory(), null);
      server.addCacheEventFilterFactory("dynamic-filter-factory", new DynamicCacheEventFilterFactory(), null);
      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.