TransactionalMultiMap

class TransactionalMultiMap(name, transaction, context)

Bases: hazelcast.proxy.base.TransactionalProxy

Transactional implementation of MultiMap.

put(key, value)

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.

Return type

hazelcast.future.Future[bool]

get(key)

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.

Return type

hazelcast.future.Future[list]

remove(key, value)

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

Return type

hazelcast.future.Future[bool]

remove_all(key)

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.

Return type

hazelcast.future.Future[list]

value_count(key)

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.

Return type

hazelcast.future.Future[int]

size()

Transactional implementation of MultiMap.size()

Returns

the number of key-value tuples in the multimap.

Return type

hazelcast.future.Future[int]