Advantage of using MultiMap

Enes Akar | Mar 29, 2012

One of the distributed data structures supported by Hazelcast is MultiMap.
It is very useful container as it stores a collection of values mapped to given key.
But as you know you can always use an Map as MultiMap.
Just create a set or list for each new key, and add to this collection in each put operation.
But in Hazelcast’s distributed world, MultiMap has extra benefits.
Hazelcast optimized the MultiMap operations so that operations (put, remove, containsValue and containsEntry) do not serialize, deserialize the whole collection.
Instead just the added or retrieved object is processed.
Note: This information is extracted from a conversation in Hazelcast mail group.
For more you can join the group.
About the Author

Enes Akar

Co-founder & CTO, Hazelcast Cloud

Enes was one of the early developers of Hazelcast. He joined the company in 2011 with a passion for making distributed computing incredible simple. From 2012 to 2017, he headed the engineering team as VP of Engineering. Since 2017, he has led the development of Hazelcast Cloud, which is enterprise-grade Hazelcast software as a fully managed service in the cloud. Prior to joining Hazelcast, Enes worked in software development and software engineering at telecommunications companies, including Alcatel-Lucent and Ericsson. He holds a Bachelor of Science in Computer Engineering and an MBA from Bogazici University, Istanbul.