-
Notifications
You must be signed in to change notification settings - Fork 4
/
IClusterMembership.cs
34 lines (28 loc) · 1.18 KB
/
IClusterMembership.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
namespace SlimCluster.Membership;
public interface IClusterMembership
{
/// <summary>
/// Represents the logical cluster id this membership represents.
/// </summary>
string ClusterId { get; }
/// <summary>
/// Gets the current members snapshot.
/// </summary>
IReadOnlyCollection<IMember> Members { get; }
/// <summary>
/// Gets the current members snapshot excluding self.
/// </summary>
IReadOnlyCollection<IMember> OtherMembers { get; }
/// <summary>
/// Gets the members representing this node.
/// </summary>
IMember SelfMember { get; }
event MemberJoinedEventHandler? MemberJoined;
event MemberLeftEventHandler? MemberLeft;
event MemberChangedEventHandler? MemberChanged;
event MemberStatusChangedEventHandler? MemberStatusChanged;
public delegate void MemberJoinedEventHandler(object sender, MemberEventArgs e);
public delegate void MemberLeftEventHandler(object sender, MemberEventArgs e);
public delegate void MemberChangedEventHandler(object sender, MemberEventArgs e);
public delegate void MemberStatusChangedEventHandler(object sender, MemberEventArgs e);
}