TransactionalMultiMap¶
- class TransactionalMultiMap(name, transaction, context)[source]¶
Bases:
hazelcast.proxy.base.TransactionalProxy
,Generic
[hazelcast.types.KeyType
,hazelcast.types.ValueType
]Transactional implementation of
MultiMap
.- put(key: hazelcast.types.KeyType, value: hazelcast.types.ValueType) bool [source]¶
Transactional implementation of
MultiMap.put(key, value)
- Parameters
key – The key to be stored.
value – The value to be stored.
- Returns
True
if the size of the multimap is increased,False
if the multimap already contains the key-value tuple.
- get(key: hazelcast.types.KeyType) Optional[List[hazelcast.types.ValueType]] [source]¶
Transactional implementation of
MultiMap.get(key)
- Parameters
key – The key whose associated values are returned.
- Returns
The collection of the values associated with the key.
- remove(key: hazelcast.types.KeyType, value: hazelcast.types.ValueType) bool [source]¶
Transactional implementation of
MultiMap.remove(key, value)
- Parameters
key – The key of the entry to remove.
value – The value of the entry to remove.
- Returns
True
if the item is removed,False
otherwise.
- remove_all(key: hazelcast.types.KeyType) List[hazelcast.types.ValueType] [source]¶
Transactional implementation of
MultiMap.remove_all(key)
- Parameters
key – The key of the entries to remove.
- Returns
The collection of the values associated with the key.
- value_count(key: hazelcast.types.KeyType) int [source]¶
Transactional implementation of
MultiMap.value_count(key)
- Parameters
key – The key whose number of values is to be returned.
- Returns
The number of values matching the given key in the multimap.
- size() int [source]¶
Transactional implementation of
MultiMap.size()
- Returns
The number of key-value tuples in the multimap.