Interface CPGroupAvailabilityListener

All Superinterfaces:
EventListener

public interface CPGroupAvailabilityListener extends 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, CPGroupAvailabilityEvents 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 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 Details

    • availabilityDecreased

      void availabilityDecreased(CPGroupAvailabilityEvent event)
      Called when a CP group's availability decreases, but still has the majority of members available.
      Parameters:
      event - CP group availability event
    • majorityLost

      void majorityLost(CPGroupAvailabilityEvent event)
      Called when a CP group has lost its majority.
      Parameters:
      event - CP group availability event