// REVIEW: In my case, there are multiple IP addresses
// One for the WIFI and the other one for VPN. For some reason the VPN one doesn't support
// Multicast
mcastService.setBind("192.168.1.100");
channel.start(Channel.DEFAULT);
ReplicatedMap map = new ReplicatedMap(null, channel, 50, "01", null);
map.put(UUID.randomUUID().toString(), localhost.getHostAddress());
for (int i = 0; i < 5; i++) {
Thread.sleep(2000);
System.out.println(localhost + ": " + map.keySet());
}
for (Object e : map.entrySetFull()) {
Map.Entry en = (Map.Entry)e;
AbstractReplicatedMap.MapEntry entry = (AbstractReplicatedMap.MapEntry)en.getValue();
System.out.println(entry);
}
map.breakdown();
channel.stop(Channel.DEFAULT);
}