Interface SplitBrainProtectionListener

  • All Superinterfaces:
    java.util.EventListener
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface SplitBrainProtectionListener
    extends java.util.EventListener
    Listener to get notified when a split brain protection state is changed.

    SplitBrainProtectionEvents are fired only after the minimum cluster size requirement is met for the first time. For instance, see the following scenario for a minimum cluster size is equal to 3:

    • Member-1 starts; no events are fired, since cluster size is still below minimum size.
    • Member-2 starts; no events are fired, since cluster size is still below minimum size.
    • Member-3 starts; no events yet, since this is the first time minimum cluster size is reached.
    • Member-1 stops; both Member-2 and Member-3 fire splitbrain protection missing events, since member count drops below 3.
    • Member-1 restarts; both Member-2 and Member-3 fire splitbrain protection present events, but Member-1 does not, because for Member-1 this is the first time minimum cluster size is met.
    • Method Detail

      • onChange

        void onChange​(SplitBrainProtectionEvent splitBrainProtectionEvent)
        Called when the state of the split brain detector is changed.
        Parameters:
        splitBrainProtectionEvent - provides information about split brain protection presence and current member list.