Package com.hazelcast.cp.event
Interface CPGroupAvailabilityEvent
public interface CPGroupAvailabilityEvent
CPGroupAvailabilityEvent is published when a CP group's
availability is decreased, or it has lost the majority completely.
- Since:
- 4.1
-
Method Summary
Modifier and TypeMethodDescriptionReturns the id of the related CP group.Returns the current members of the CP group.int
Returns the majority member count of the CP group.Returns the unavailable members of the CP group.boolean
Returns whether this group has the majority of its members available or not.boolean
Returns whether this is the METADATA CP group or not.
-
Method Details
-
getGroupId
CPGroupId getGroupId()Returns the id of the related CP group.- Returns:
- CP group id
-
getGroupMembers
Collection<CPMember> getGroupMembers()Returns the current members of the CP group.- Returns:
- group members
-
getMajority
int getMajority()Returns the majority member count of the CP group. Simply it's(memberCount/2) + 1
- Returns:
- majority
-
isMajorityAvailable
boolean isMajorityAvailable()Returns whether this group has the majority of its members available or not.- Returns:
- true if the group still has the majority, false otherwise
-
isMetadataGroup
boolean isMetadataGroup()Returns whether this is the METADATA CP group or not.- Returns:
- true if the group is METADATA group, false otherwise
-