Package com.hazelcast.cp.event
Interface CPGroupAvailabilityListener
- All Superinterfaces:
EventListener
CPGroupAvailabilityListener is notified when availability
of a CP group decreases, or it loses the majority completely.
In general, availability decreases when a CP member becomes unreachable
because of process crash, network partition, out of memory etc.
Once a member is declared as unavailable by the Hazelcast's failure detector,
that member is removed from the cluster. If it is also a CP member,
CPGroupAvailabilityEvent
s are fired for each
CP group that member belongs to.
As a special case, CPGroupAvailabilityListener has a separate method to report loss of majority. When the majority of a CP group is lost, that CP group cannot make progress anymore. Even a new CP member cannot join to this CP group, because membership changes also go through the Raft consensus algorithm. When a CP group has lost its majority:
- If the group is a non-METADATA CP group, it must be force-destroyed immediately, because it can block the METADATA CP group to perform membership changes on CP Subsystem.
- If the majority of the METADATA CP group permanently crash, unfortunately it is equivalent to the permanent crash of the majority CP members of the whole CP Subsystem, even though other CP groups are running fine.
- Since:
- 4.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called when a CP group's availability decreases, but still has the majority of members available.void
Called when a CP group has lost its majority.
-
Method Details
-
availabilityDecreased
Called when a CP group's availability decreases, but still has the majority of members available.- Parameters:
event
- CP group availability event
-
majorityLost
Called when a CP group has lost its majority.- Parameters:
event
- CP group availability event
-