diff --git a/hazelcast/pom.xml b/hazelcast/pom.xml
index 62cfa89c0f..00960eadd2 100644
--- a/hazelcast/pom.xml
+++ b/hazelcast/pom.xml
@@ -1,72 +1,77 @@
- 4.0.0
- com.baeldung
- hazelcast
- 0.0.1-SNAPSHOT
- hazelcast
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ com.baeldung
+ hazelcast
+ 0.0.1-SNAPSHOT
+ hazelcast
-
-
-
- com.hazelcast
- hazelcast-all
- ${hazelcast.version}
-
-
-
-
- org.slf4j
- slf4j-api
- ${org.slf4j.version}
-
-
-
- ch.qos.logback
- logback-classic
- ${logback.version}
-
-
-
- ch.qos.logback
- logback-core
- ${logback.version}
-
+
+
+ com.hazelcast
+ hazelcast
+ ${hazelcast.version}
+
+
+
+ com.hazelcast
+ hazelcast-client
+ 3.7.2
+
+
+
+
+ org.slf4j
+ slf4j-api
+ ${org.slf4j.version}
+
+
+
+ ch.qos.logback
+ logback-classic
+ ${logback.version}
+
+
+
+ ch.qos.logback
+ logback-core
+ ${logback.version}
+
-
+
-
- hazelcast
-
-
- src/main/resources
- true
-
-
+
+ hazelcast
+
+
+ src/main/resources
+ true
+
+
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- ${maven-compiler-plugin.version}
-
- 1.8
- 1.8
-
-
-
-
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ ${maven-compiler-plugin.version}
+
+ 1.8
+ 1.8
+
+
+
+
-
-
- 3.7
-
-
- 1.7.21
- 1.1.7
+
+
+ 3.7.2
+
+
+ 1.7.21
+ 1.1.7
-
- 3.5.1
-
+
+ 3.5.1
+
\ No newline at end of file
diff --git a/hazelcast/src/main/java/com/baeldung/hazelcast/cluster/ServerNode.java b/hazelcast/src/main/java/com/baeldung/hazelcast/cluster/ServerNode.java
index 8680180399..01043cf712 100644
--- a/hazelcast/src/main/java/com/baeldung/hazelcast/cluster/ServerNode.java
+++ b/hazelcast/src/main/java/com/baeldung/hazelcast/cluster/ServerNode.java
@@ -16,8 +16,9 @@ public class ServerNode {
HazelcastInstance hazelcastInstance = Hazelcast.newHazelcastInstance();
Map countryMap = hazelcastInstance.getMap("country");
IdGenerator idGenerator = hazelcastInstance.getIdGenerator("newid");
- Long countryIdGenerator = idGenerator.newId() == 0L ? 1L : idGenerator.newId();
- countryMap.put(countryIdGenerator, "Country1");
+ for (int i = 0; i < 10; i++) {
+ countryMap.put(idGenerator.newId(), "message" + 1);
+ }
logger.info("Country map size: " + countryMap.size());
}
}