Class: ReplicatedMultiMap

akkaserverless.replicatedentity. ReplicatedMultiMap

A replicated multimap (map of sets).

A replicated map that maps keys to values, where each key may be associated with multiple values.


new ReplicatedMultiMap()

Implements:

Members


<readonly> keysSize :number

The number of keys with values stored in the multimap.

Type:
  • number

<readonly> size :number

The total number of values stored in the multimap.

Type:
  • number

Methods


clear()

Clear all entries from this multimap.

Returns:

This multimap.

Type
module:akkaserverless.replicatedentity.ReplicatedMultiMap

delete(key, value)

Delete a single key-value pair for the given key and value.

Parameters:
Name Type Description
key module:akkaserverless.Serializable

The key of the entry.

value module:akkaserverless.Serializable

The value to remove from the entry.

Returns:

This multimap.

Type
module:akkaserverless.replicatedentity.ReplicatedMultiMap

deleteAll(key)

Delete all values associated with the given key.

Parameters:
Name Type Description
key module:akkaserverless.Serializable

The key of the entry.

Returns:

This multimap.

Type
module:akkaserverless.replicatedentity.ReplicatedMultiMap

get(key)

Get the values for the given key.

Parameters:
Name Type Description
key module:akkaserverless.Serializable

The key of the entry.

Returns:

The current values at the given key, or an empty Set.

Type
Set.<module:akkaserverless.Serializable>

has(key)

Check whether this multimap contains at least one value for the given key.

Parameters:
Name Type Description
key module:akkaserverless.Serializable

The key to check.

Returns:

True if this multimap contains any values for the given key.

Type
boolean

hasValue(key, value)

Check whether this multimap contains the given value associated with the given key.

Parameters:
Name Type Description
key module:akkaserverless.Serializable

The key to check.

value module:akkaserverless.Serializable

The value to check.

Returns:

True if the key-value pair is in this multimap.

Type
boolean

keys()

Return an iterator of the keys of this multimap.

Returns:
Type
IterableIterator.<module:akkaserverless.Serializable>

put(key, value)

Store a key-value pair.

Parameters:
Name Type Description
key module:akkaserverless.Serializable

The key of the entry.

value module:akkaserverless.Serializable

The value to add to the entry.

Returns:

This multimap.

Type
module:akkaserverless.replicatedentity.ReplicatedMultiMap

putAll(key, values)

Store multiple values for a key.

Parameters:
Name Type Description
key module:akkaserverless.Serializable

The key of the entry.

values Iterator.<module:akkaserverless.Serializable>

The values to add to the entry.

Returns:

This multimap.

Type
module:akkaserverless.replicatedentity.ReplicatedMultiMap