C# Class 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.
Datei anzeigen Open project: rogeralsing/akka.net Class Usage Examples

Public Properties

Property Type Description
ConvergenceSkipUnreachableWithMemberStatus ImmutableHashSet
Empty Gossip
EmptyMembers ImmutableSortedSet
RemoveUnreachableWithMemberStatus ImmutableHashSet

Public Methods

Method Description
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

Private Methods

Method Description
AssertInvariants ( ) : void
LeaderOf ( ImmutableSortedSet mbrs, UniqueAddress selfUniqueAddress ) : UniqueAddress

Method Details

AddMember() public method

Adds a member to the member node ring.
public AddMember ( Member member ) : Gossip
member Member
return Gossip

Convergence() public method

public Convergence ( UniqueAddress selfUniqueAddress ) : bool
selfUniqueAddress UniqueAddress
return bool

Copy() public method

public Copy ( ImmutableSortedSet members = null, GossipOverview overview = null, VectorClock version = null ) : Gossip
members ImmutableSortedSet
overview GossipOverview
version VectorClock
return Gossip

Create() public static method

public static Create ( ImmutableSortedSet members ) : Gossip
members ImmutableSortedSet
return Gossip

GetMember() public method

public GetMember ( UniqueAddress node ) : Member
node UniqueAddress
return Member

Gossip() public method

public Gossip ( ImmutableSortedSet members ) : System
members ImmutableSortedSet
return System

Gossip() public method

public Gossip ( ImmutableSortedSet members, GossipOverview overview ) : System
members ImmutableSortedSet
overview GossipOverview
return System

Gossip() public method

public Gossip ( ImmutableSortedSet members, GossipOverview overview, VectorClock version ) : System
members ImmutableSortedSet
overview GossipOverview
version VectorClock
return System

HasMember() public method

public HasMember ( UniqueAddress node ) : bool
node UniqueAddress
return bool

Increment() public method

Increments the version for this 'Node'.
public Increment ( VectorClock node ) : Gossip
node VectorClock
return Gossip

IsLeader() public method

public IsLeader ( UniqueAddress node, UniqueAddress selfUniqueAddress ) : bool
node UniqueAddress
selfUniqueAddress UniqueAddress
return bool

Leader() public method

public Leader ( UniqueAddress selfUniqueAddress ) : UniqueAddress
selfUniqueAddress UniqueAddress
return UniqueAddress

Merge() public method

public Merge ( Gossip that ) : Gossip
that Gossip
return Gossip

MergeSeen() public method

public MergeSeen ( Gossip that ) : Gossip
that Gossip
return Gossip

OnlySeen() public method

Marks the gossip as seen by only this node (address) by replacing the 'gossip.overview.seen'
public OnlySeen ( UniqueAddress node ) : Gossip
node UniqueAddress
return Gossip

RoleLeader() public method

public RoleLeader ( string role, UniqueAddress selfUniqueAddress ) : UniqueAddress
role string
selfUniqueAddress UniqueAddress
return UniqueAddress

Seen() public method

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
return Gossip

SeenByNode() public method

Has this Gossip been seen by this node.
public SeenByNode ( UniqueAddress node ) : bool
node UniqueAddress
return bool

ToString() public method

public ToString ( ) : string
return string

Property Details

ConvergenceSkipUnreachableWithMemberStatus public_oe static_oe property

public static ImmutableHashSet ConvergenceSkipUnreachableWithMemberStatus
return ImmutableHashSet

Empty public_oe static_oe property

public static Gossip,Akka.Cluster Empty
return Gossip

EmptyMembers public_oe static_oe property

public static ImmutableSortedSet EmptyMembers
return ImmutableSortedSet

RemoveUnreachableWithMemberStatus public_oe static_oe property

public static ImmutableHashSet RemoveUnreachableWithMemberStatus
return ImmutableHashSet