use of org.infinispan.client.hotrod.configuration.Configuration 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);
}
}
use of org.infinispan.client.hotrod.configuration.Configuration in project wildfly by wildfly.
the class RemoteCacheContainerServiceConfigurator method get.
@Override
public RemoteCacheManager get() {
Configuration configuration = this.configuration.get();
RemoteCacheManager container = new RemoteCacheManager(this.name, configuration, this.registrar);
container.start();
InfinispanLogger.ROOT_LOGGER.remoteCacheContainerStarted(this.name);
return container;
}
use of org.infinispan.client.hotrod.configuration.Configuration in project wildfly by wildfly.
the class RemoteCacheContainerConfigurationServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<Configuration> configuration = new CompositeDependency(this.loader, this.modules, this.connectionPool, this.security, this.server).register(builder).provides(this.getServiceName());
for (Dependency dependency : this.threadPools.values()) {
dependency.register(builder);
}
for (List<SupplierDependency<OutboundSocketBinding>> dependencies : this.clusters.values()) {
for (Dependency dependency : dependencies) {
dependency.register(builder);
}
}
Service service = new FunctionalService<>(configuration, Function.identity(), this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Aggregations