Class: ReplicatedRegisterMap

akkaserverless.replicatedentity. ReplicatedRegisterMap

A replicated map of registers.


new ReplicatedRegisterMap()

Implements:

Members


<readonly> size :number

The number of elements in this map.

Type:
  • number

Methods


clear()

Clear all registers from this register map.

Returns:

This register map.

Type
module:akkaserverless.replicatedentity.ReplicatedRegisterMap

delete(key)

Delete the register at the given key.

Parameters:
Name Type Description
key module:akkaserverless.Serializable

The key to delete.

Returns:

This register map.

Type
module:akkaserverless.replicatedentity.ReplicatedRegisterMap

get(key)

Get the value at the given key.

Parameters:
Name Type Description
key module:akkaserverless.Serializable

The key to get.

Returns:

The register value, or undefined if no value is defined at that key.

Type
number | undefined

has(key)

Check whether this map contains a value of the given key.

Parameters:
Name Type Description
key module:akkaserverless.Serializable

The key to check.

Returns:

True if this register map contains a value for the given key.

Type
boolean

keys()

Return an iterator of the keys of this register map.

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

set(key, value [, clock] [, customClockValue])

Set the register at the given key to the given value.

Parameters:
Name Type Argument Default Description
key module:akkaserverless.Serializable

The key for the register.

value module:akkaserverless.Serializable

The new value for the register.

clock module:akkaserverless.replicatedentity.Clock <optional>
Clocks.DEFAULT

The register clock.

customClockValue number <optional>
0

Clock value when using custom clock, otherwise ignored.

Returns:

This register map.

Type
module:akkaserverless.replicatedentity.ReplicatedRegisterMap