I am using the following code to create an map in HazelCast
HazelcastInstance instance = null;
Config cfg = new Config();
instance =Hazelcast.newHazelcastInstance(cfg);
instance.getMap(mapName);
Once I am done with the my processing I want to remove this map from HazelCast. Can you Please suggest how to go about it.
getMap(mapName). destroy();
Getting a Map and Putting an Entry Let's create a Hazelcast instance and fill a map named Capitals with key-value pairs using the following code. Use the HazelcastInstance getMap method to get the map, then use the map put method to put an entry into the map.
Hazelcast distributes the map entries onto multiple cluster members. Each member holds some portion of the data. Distributed maps have one backup by default. If a member goes down, your data is recovered using the backups in the cluster.
I did not receive any replies but got the answer. You can use
instance.getMap(mapName).destroy();
I am posting this so that it might help someone else in need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With