C# Класс Akka.Cluster.Gossip

Represents the state of the cluster; cluster ring membership, ring convergence - all versioned by a vector clock. When a node is joining the `Member`, with status `Joining`, is added to `members`. If the joining node was downed it is moved from `overview.unreachable` (status `Down`) to `members` (status `Joining`). It cannot rejoin if not first downed. When convergence is reached the leader change status of `members` from `Joining` to `Up`. When failure detector consider a node as unavailable it will be moved from `members` to `overview.unreachable`. When a node is downed, either manually or automatically, its status is changed to `Down`. It is also removed from `overview.seen` table. The node will reside as `Down` in the `overview.unreachable` set until joining again and it will then go through the normal joining procedure. When a `Gossip` is received the version (vector clock) is used to determine if the received `Gossip` is newer or older than the current local `Gossip`. The received `Gossip` and local `Gossip` is merged in case of conflicting version, i.e. vector clocks without same history. When a node is told by the user to leave the cluster the leader will move it to `Leaving` and then rebalance and repartition the cluster and start hand-off by migrating the actors from the leaving node to the new partitions. Once this process is complete the leader will move the node to the `Exiting` state and once a convergence is complete move the node to `Removed` by removing it from the `members` set and sending a `Removed` command to the removed node telling it to shut itself down.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
ConvergenceSkipUnreachableWithMemberStatus ImmutableHashSet
Empty Gossip
EmptyMembers ImmutableSortedSet
RemoveUnreachableWithMemberStatus ImmutableHashSet

Открытые методы

Метод Описание
AddMember ( Member member ) : Gossip

Adds a member to the member node ring.

Convergence ( UniqueAddress selfUniqueAddress ) : bool
Copy ( ImmutableSortedSet members = null, GossipOverview overview = null, VectorClock version = null ) : Gossip
Create ( ImmutableSortedSet members ) : Gossip
GetMember ( UniqueAddress node ) : Member
Gossip ( ImmutableSortedSet members ) : System
Gossip ( ImmutableSortedSet members, GossipOverview overview ) : System
Gossip ( ImmutableSortedSet members, GossipOverview overview, VectorClock version ) : System
HasMember ( UniqueAddress node ) : bool
Increment ( VectorClock node ) : Gossip

Increments the version for this 'Node'.

IsLeader ( UniqueAddress node, UniqueAddress selfUniqueAddress ) : bool
Leader ( UniqueAddress selfUniqueAddress ) : UniqueAddress
Merge ( Gossip that ) : Gossip
MergeSeen ( Gossip that ) : Gossip
OnlySeen ( UniqueAddress node ) : Gossip

Marks the gossip as seen by only this node (address) by replacing the 'gossip.overview.seen'

RoleLeader ( string role, UniqueAddress selfUniqueAddress ) : UniqueAddress
Seen ( UniqueAddress node ) : Gossip

Marks the gossip as seen by this node (address) by updating the address entry in the 'gossip.overview.seen'

SeenByNode ( UniqueAddress node ) : bool

Has this Gossip been seen by this node.

ToString ( ) : string

Приватные методы

Метод Описание
AssertInvariants ( ) : void
LeaderOf ( ImmutableSortedSet mbrs, UniqueAddress selfUniqueAddress ) : UniqueAddress

Описание методов

AddMember() публичный Метод

Adds a member to the member node ring.
public AddMember ( Member member ) : Gossip
member Member
Результат Gossip

Convergence() публичный Метод

public Convergence ( UniqueAddress selfUniqueAddress ) : bool
selfUniqueAddress UniqueAddress
Результат bool

Copy() публичный Метод

public Copy ( ImmutableSortedSet members = null, GossipOverview overview = null, VectorClock version = null ) : Gossip
members ImmutableSortedSet
overview GossipOverview
version VectorClock
Результат Gossip

Create() публичный статический Метод

public static Create ( ImmutableSortedSet members ) : Gossip
members ImmutableSortedSet
Результат Gossip

GetMember() публичный Метод

public GetMember ( UniqueAddress node ) : Member
node UniqueAddress
Результат Member

Gossip() публичный Метод

public Gossip ( ImmutableSortedSet members ) : System
members ImmutableSortedSet
Результат System

Gossip() публичный Метод

public Gossip ( ImmutableSortedSet members, GossipOverview overview ) : System
members ImmutableSortedSet
overview GossipOverview
Результат System

Gossip() публичный Метод

public Gossip ( ImmutableSortedSet members, GossipOverview overview, VectorClock version ) : System
members ImmutableSortedSet
overview GossipOverview
version VectorClock
Результат System

HasMember() публичный Метод

public HasMember ( UniqueAddress node ) : bool
node UniqueAddress
Результат bool

Increment() публичный Метод

Increments the version for this 'Node'.
public Increment ( VectorClock node ) : Gossip
node VectorClock
Результат Gossip

IsLeader() публичный Метод

public IsLeader ( UniqueAddress node, UniqueAddress selfUniqueAddress ) : bool
node UniqueAddress
selfUniqueAddress UniqueAddress
Результат bool

Leader() публичный Метод

public Leader ( UniqueAddress selfUniqueAddress ) : UniqueAddress
selfUniqueAddress UniqueAddress
Результат UniqueAddress

Merge() публичный Метод

public Merge ( Gossip that ) : Gossip
that Gossip
Результат Gossip

MergeSeen() публичный Метод

public MergeSeen ( Gossip that ) : Gossip
that Gossip
Результат Gossip

OnlySeen() публичный Метод

Marks the gossip as seen by only this node (address) by replacing the 'gossip.overview.seen'
public OnlySeen ( UniqueAddress node ) : Gossip
node UniqueAddress
Результат Gossip

RoleLeader() публичный Метод

public RoleLeader ( string role, UniqueAddress selfUniqueAddress ) : UniqueAddress
role string
selfUniqueAddress UniqueAddress
Результат UniqueAddress

Seen() публичный Метод

Marks the gossip as seen by this node (address) by updating the address entry in the 'gossip.overview.seen'
public Seen ( UniqueAddress node ) : Gossip
node UniqueAddress
Результат Gossip

SeenByNode() публичный Метод

Has this Gossip been seen by this node.
public SeenByNode ( UniqueAddress node ) : bool
node UniqueAddress
Результат bool

ToString() публичный Метод

public ToString ( ) : string
Результат string

Описание свойств

ConvergenceSkipUnreachableWithMemberStatus публичное статическое свойство

public static ImmutableHashSet ConvergenceSkipUnreachableWithMemberStatus
Результат ImmutableHashSet

Empty публичное статическое свойство

public static Gossip,Akka.Cluster Empty
Результат Gossip

EmptyMembers публичное статическое свойство

public static ImmutableSortedSet EmptyMembers
Результат ImmutableSortedSet

RemoveUnreachableWithMemberStatus публичное статическое свойство

public static ImmutableHashSet RemoveUnreachableWithMemberStatus
Результат ImmutableHashSet