Skip to main content
Version: 5.20

Configure MultiMaps

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.

FieldDescription
nameName of the MultiMap that you're creating. If empty, the custom resource (CR) name is used.
hazelcastResourceNameName of the Hazelcast resource.
backupCountNumber of synchronous backups.
asyncBackupCountNumber of asynchronous backups.
binaryWhen true, stores all MultiMap values in BINARY format. When false, values are stored in OBJECT format.
collectionTypeThe 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.

Example configuration
yaml
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:

shell
kubectl get multimap multimap-sample -o wide
NAME STATUS HAZELCAST-RESOURCE MESSAGE
multimap-sample Success hazelcast