use of org.infinispan.server.hotrod.configuration.HotRodServerConfiguration in project hazelcast-simulator by hazelcast.
the class InfinispanDriver method startVendorInstance.
@Override
public void startVendorInstance() throws Exception {
String workerType = get("WORKER_TYPE");
if ("javaclient".equals(workerType)) {
Properties hotrodProperties = new Properties();
hotrodProperties.setProperty("infinispan.client.hotrod.server_list", get("server_list"));
Configuration configuration = new ConfigurationBuilder().withProperties(hotrodProperties).build();
RemoteCacheManager remoteCacheManager = new RemoteCacheManager(configuration);
this.cacheContainer = remoteCacheManager;
remoteCacheManager.start();
} else {
DefaultCacheManager defaultCacheManager = new DefaultCacheManager("infinispan.xml");
this.cacheContainer = defaultCacheManager;
defaultCacheManager.start();
HotRodServerConfiguration hotRodServerConfiguration = new HotRodServerConfigurationBuilder().host(get("PRIVATE_ADDRESS")).port(11222).build();
this.hotRodServer = new HotRodServer();
hotRodServer.start(hotRodServerConfiguration, defaultCacheManager);
}
}
Aggregations