Hazelcast MultiMap, also known as IMultiMap, is a specialized map for storing multiple values under a single key. Just like any other distributed data structure implementation in Hazelcast, MultiMap is distributed and thread-safe. You can create and configure MultiMaps using the MultiMap custom resource.
Configure a MultiMap resource
You can use any of the following configuration options in the MultiMap resource. For more information, see the API reference.
| Field | Description |
|---|---|
|
Name of the MultiMap that you’re creating. If empty, the custom resource (CR) name is used. |
|
Name of the Hazelcast resource. |
|
Count of synchronous backups. |
|
When true, stores all MultiMap values in BINARY format. When false, values are stored in OBJECT format. |
|
The type of the value collection. Use either SET or LIST. |
Example configuration
The following MultiMap custom resource creates a MultiMap for the Hazelcast resource that is defined in the hazelcastResourceName field.
apiVersion: hazelcast.com/v1alpha1
kind: MultiMap
metadata:
name: multimap-sample
spec:
hazelcastResourceName: hazelcast
binary: false
backupCount: 1
collectionType: SET
After creating the MultiMap resource, you can check its status:
kubectl get multimap multimap-sample -o wide
NAME STATUS HAZELCAST-RESOURCE MESSAGE
multimap-sample Success hazelcast