I am using hazelCast-3.0 jars . I am able to create vertical cluster(on the same System where only port no. differ from one server to other Ip remains the same.) and its working pretty good.But i want to create horizontal cluster(where i can use any ip address along with any port no. depending on the configuration). If this is possible in hazelCast then please share how. i went through several links like http://www.hazelcast.com/docs/1.9.4/manual/multi_html/ch11.html
if this link is useful the suggest me how. I made only change to hazelcast.xml.
<tcp-ip enabled="true">
<hostname>172.22.65.111</hostname>
<hostname>172.22.68.19</hostname>
<interface>172.22.*.*</interface>
</tcp-ip>
在两个系统上都使用相同的 jar 文件。我创建了一个地图名称“xyz”并为其存储了一些值。然后它应该可用于具有相同地图名称“xyz”的其他系统。这是我在我的系统上使用的代码 clientConfig.addAddress("172.22.65.111:5701"); System.out.println("p2"); HazelcastInstance 客户端 = HazelcastClient .newHazelcastClient(clientConfig);
IMap<Integer, String> map = client.getMap("m");
map.put(1,"ram");
除了 ip 和端口,第二个系统上也有相同的代码。而不是把我放在另一个系统上。