| MembershipEventGetMembers Method |
Returns a consistent view of the the members exactly after this MembershipEvent has been processed.
Namespace:
Hazelcast.Core
Assembly:
Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.9.3
Syntax public virtual ICollection<IMember> GetMembers()
Public Overridable Function GetMembers As ICollection(Of IMember)
public:
virtual ICollection<IMember^>^ GetMembers()
abstract GetMembers : unit -> ICollection<IMember>
override GetMembers : unit -> ICollection<IMember>
Return Value
Type:
ICollectionIMemberthe members at the moment after this event.
Remarks
Returns a consistent view of the the members exactly after this MembershipEvent has been processed. So if a
member is removed, the returned set will not include this member. And if a member is added it will include
this member.
The problem with calling the
ICluster.GetMembers()
is that the content could already
have changed while processing this event so it becomes very difficult to write a deterministic algorithm since
you can't get a deterministic view of the members. This method solves that problem.
The set is immutable and ordered. For more information see
ICluster.GetMembers()
.
See Also