Class: Vote

akkaserverless.replicatedentity. Vote

A Vote Replicated Data type.

A Vote Replicated Data type allows all nodes an a cluster to vote on a condition, such as whether a user is online.

Members


<readonly> all :boolean

Whether all of nodes have voted for this condition.

Type:
  • boolean

<readonly> atLeastOne :boolean

Whether at least one node has voted for this condition.

Type:
  • boolean

<readonly> majority :boolean

Whether a majority of nodes have voted for this condition.

Type:
  • boolean

<readonly> totalVoters :number

The total number of nodes that have voted.

Type:
  • number

vote :boolean

The current nodes vote.

Setting this will update the current nodes vote accordingly.

Type:
  • boolean

<readonly> votesFor :number

The number of nodes that have voted for this condition.

Type:
  • number