Getatlas 4rsd821nwq
Help CenterData Structures & APIsWorking with Hazelcast Maps

Working with Hazelcast Maps

Last updated August 17, 2024

Hazelcast Maps are a fundamental data structure provided by the Hazelcast in-memory data grid, offering a powerful and efficient way to manage data in a distributed and scalable manner. This guide will explore the key features and functionalities of Hazelcast Maps, allowing you to leverage their capabilities for your applications.

Hazelcast Map Features

  • Distributed Storage: Hazelcast Maps store data across multiple nodes in a cluster, enabling horizontal scalability and high availability. Data is distributed evenly across nodes, ensuring balanced load and efficient access.
  • Key-Value Pairs: Similar to standard Maps in programming languages, Hazelcast Maps store data in key-value pairs. Keys are used to uniquely identify and retrieve associated values.
  • Concurrency and Transactions: Hazelcast Maps provide built-in concurrency control mechanisms to handle concurrent access from multiple clients or threads. They also support distributed transactions, ensuring consistency and reliability when performing multiple operations across multiple nodes.
  • Data Expiry: You can configure Hazelcast Maps to expire data automatically based on its age or idle time. This helps manage data lifecycle and optimize storage utilization.
  • Cache Eviction Policies: When your Hazelcast Map reaches its limit, eviction policies can automatically remove entries based on criteria like Least Recently Used (LRU), Least Frequently Used (LFU), or other configurable strategies.

Using Hazelcast Maps

1. **Get a Map:** Access a Hazelcast Map through the Hazelcast client using the `getMap()` method, specifying its name.

Was this article helpful?